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)Creates a newDefaultTableRepository, using a defaultTableListerimplementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddropTableIfExists(ObjectName table)Drops given table if it existsvoidrenameTable(ObjectName oldTable, ObjectName newTable)Renames the tableList<TableProperties>showTables(SchemaName schema)Returns list of tables for a given schema.List<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)
Creates a newDefaultTableRepository, using a defaultTableListerimplementation.- Parameters:
session- Snowpark session object
-
-
Method Detail
-
dropTableIfExists
public void dropTableIfExists(ObjectName table)
Description copied from interface:TableRepositoryDrops given table if it exists- Specified by:
dropTableIfExistsin interfaceTableRepository- Parameters:
table- table to drop
-
renameTable
public void renameTable(ObjectName oldTable, ObjectName newTable)
Description copied from interface:TableRepositoryRenames the table- Specified by:
renameTablein interfaceTableRepository- Parameters:
oldTable- old tablenewTable- new table
-
showTables
public List<TableProperties> showTables(SchemaName schema)
Description copied from interface:TableListerReturns list of tables for a given schema.- Specified by:
showTablesin interfaceTableLister- Parameters:
schema- schema name- Returns:
- list of tables for a given schema
-
showTables
public List<TableProperties> showTables(SchemaName schema, String like)
Description copied from interface:TableListerReturns list of tables for a given schema with additional filter expression.- Specified by:
showTablesin interfaceTableLister- Parameters:
schema- schema namelike- filter expression (case-sensitive), e.g.MYTABLEor%TAB%- Returns:
- list of tables
-
-