Package io.trino.testing.sql
Class TestTable
java.lang.Object
io.trino.testing.sql.TestTable
- All Implemented Interfaces:
TemporaryRelation,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final SqlExecutorprotected final String -
Constructor Summary
ConstructorsConstructorDescriptionTestTable(SqlExecutor sqlExecutor, String namePrefix, String tableDefinition) TestTable(SqlExecutor sqlExecutor, String namePrefix, String tableDefinition, List<String> rowsToInsert) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidcreateAndInsert(List<String> rowsToInsert) static TestTablefromColumns(SqlExecutor sqlExecutor, String namePrefix, Map<String, List<String>> columns) static TestTablefromColumns(SqlExecutor sqlExecutor, String namePrefix, Map<String, List<String>> columns, String defaultValue) static TestTablefromColumnValueProviders(SqlExecutor sqlExecutor, String namePrefix, int rowsCount, Map<String, Function<Integer, String>> columnsValueProviders) getName()
-
Field Details
-
sqlExecutor
-
tableDefinition
-
name
-
-
Constructor Details
-
TestTable
-
TestTable
public TestTable(SqlExecutor sqlExecutor, String namePrefix, String tableDefinition, List<String> rowsToInsert)
-
-
Method Details
-
createAndInsert
-
getName
- Specified by:
getNamein interfaceTemporaryRelation
-
fromColumns
-
fromColumns
-
fromColumnValueProviders
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTemporaryRelation
-