public class Tuples
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Tuples.DelayedValue
Similar to Value, but contains at least one NonTerminal, such as a non-pure functions or bind marker.
|
static class |
Tuples.InMarker
Represents a marker for a set of IN values that are tuples, like "SELECT ...
|
static class |
Tuples.INRaw
A raw marker for an IN list of tuples, like "SELECT ...
|
static class |
Tuples.InValue
A terminal value for a list of IN values that are tuples.
|
static class |
Tuples.Literal
A raw, literal tuple.
|
static class |
Tuples.Marker
{@code
Represents a marker for a single tuple, like "SELECT ...
|
static class |
Tuples.Raw
A raw placeholder for a tuple of values for different multiple columns, each of which may have a different type.
|
static class |
Tuples.Value
A tuple of terminal values (e.g (123, 'abc')).
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkIfTupleType(AbstractType<?> tuple) |
static ColumnSpecification |
componentSpecOf(ColumnSpecification column,
int component) |
static <T> AbstractType<?> |
getExactTupleTypeIfKnown(java.util.List<T> items,
java.util.function.Function<T,AbstractType<?>> mapper)
Returns the exact TupleType from the items if it can be known.
|
static TupleType |
getTupleType(AbstractType<?> tuple) |
static AssignmentTestable.TestResult |
testTupleAssignment(ColumnSpecification receiver,
java.util.List<? extends AssignmentTestable> elements)
Tests that the tuple with the specified elements can be assigned to the specified column.
|
static <T> java.lang.String |
tupleToString(java.lang.Iterable<T> items,
java.util.function.Function<T,java.lang.String> mapper)
Create a
String representation of the tuple from the specified items associated to
the tuples elements. |
static java.lang.String |
tupleToString(java.util.List<?> elements)
Create a
String representation of the tuple containing the specified elements. |
static void |
validateTupleAssignableTo(ColumnSpecification receiver,
java.util.List<? extends AssignmentTestable> elements)
Checks if the tuple with the specified elements can be assigned to the specified column.
|
public static ColumnSpecification componentSpecOf(ColumnSpecification column, int component)
public static java.lang.String tupleToString(java.util.List<?> elements)
String
representation of the tuple containing the specified elements.elements
- the tuple elementsString
representation of the tuplepublic static <T> java.lang.String tupleToString(java.lang.Iterable<T> items, java.util.function.Function<T,java.lang.String> mapper)
String
representation of the tuple from the specified items associated to
the tuples elements.items
- items associated to the tuple elementsmapper
- the mapper used to map the items to the String
representation of the tuple elementsString
representation of the tuplepublic static <T> AbstractType<?> getExactTupleTypeIfKnown(java.util.List<T> items, java.util.function.Function<T,AbstractType<?>> mapper)
items
- the items mapped to the tuple elementsmapper
- the mapper used to retrieve the element types from the itemsnull
public static void validateTupleAssignableTo(ColumnSpecification receiver, java.util.List<? extends AssignmentTestable> elements)
receiver
- the receiving columnelements
- the tuple elementsInvalidRequestException
- if the tuple cannot be assigned to the specified column.public static AssignmentTestable.TestResult testTupleAssignment(ColumnSpecification receiver, java.util.List<? extends AssignmentTestable> elements)
receiver
- the receiving columnelements
- the tuple elementspublic static boolean checkIfTupleType(AbstractType<?> tuple)
public static TupleType getTupleType(AbstractType<?> tuple)
Copyright © 2009-2019 The Apache Software Foundation