Class DefaultTableRepository
- java.lang.Object
-
- com.snowflake.connectors.common.table.DefaultTableRepository
-
- All Implemented Interfaces:
TableLister
,TableRepository
public class DefaultTableRepository extends Object implements TableRepository
Implements operations on snowflake TABLE objects
-
-
Constructor Summary
Constructors Constructor Description DefaultTableRepository(Session session)
Create DefaultTableRepository
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dropTableIfExists(ObjectName table)
Drops given table if it existsList<TableProperties>
showTables(SchemaName schema)
Returns list of tables for a given schemaList<TableProperties>
showTables(SchemaName schema, String like)
Returns list of tables for a given schema with additional filter expression.
-
-
-
Constructor Detail
-
DefaultTableRepository
public DefaultTableRepository(Session session)
Create DefaultTableRepository- Parameters:
session
-
-
-
Method Detail
-
dropTableIfExists
public void dropTableIfExists(ObjectName table)
Drops given table if it exists- Specified by:
dropTableIfExists
in interfaceTableRepository
- Parameters:
table
- table to drop
-
showTables
public List<TableProperties> showTables(SchemaName schema)
Returns list of tables for a given schema- Specified by:
showTables
in interfaceTableLister
- Returns:
- list of tables for a given schema
-
showTables
public List<TableProperties> showTables(SchemaName schema, String like)
Returns list of tables for a given schema with additional filter expression.- Specified by:
showTables
in interfaceTableLister
like
- filter expression, eg. "MYTABLE", "%TAB%"- Returns:
- list of tables
-
-