Class SpannerSchema
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseSchema
-
- migratedb.v1.core.internal.database.spanner.SpannerSchema
-
- All Implemented Interfaces:
Schema
public class SpannerSchema extends BaseSchema
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseSchema
jdbcTemplate, name
-
-
Constructor Summary
Constructors Constructor Description SpannerSchema(JdbcTemplate jdbcTemplate, SpannerDatabase database, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<SpannerTable>doAllTables()Retrieves all the tables in this schema.protected booleandoCheckIfEmpty()Checks whether this schema is empty.protected voiddoCreate()Creates this schema in the database.protected booleandoExists()Checks whether this schema exists.protected SpannerDatabasegetDatabase()TablegetTable(String tableName)Retrieves the table with this name in this schema.
-
-
-
Constructor Detail
-
SpannerSchema
public SpannerSchema(JdbcTemplate jdbcTemplate, SpannerDatabase database, String name)
-
-
Method Detail
-
doExists
protected boolean doExists()
Description copied from class:BaseSchemaChecks whether this schema exists.- Specified by:
doExistsin classBaseSchema
-
doCheckIfEmpty
protected boolean doCheckIfEmpty() throws SQLExceptionDescription copied from class:BaseSchemaChecks whether this schema is empty.- Specified by:
doCheckIfEmptyin classBaseSchema- Throws:
SQLException- when the check failed.
-
getDatabase
protected SpannerDatabase getDatabase()
- Overrides:
getDatabasein classBaseSchema
-
doCreate
protected void doCreate()
Description copied from class:BaseSchemaCreates this schema in the database.- Specified by:
doCreatein classBaseSchema
-
doAllTables
protected List<SpannerTable> doAllTables() throws SQLException
Description copied from class:BaseSchemaRetrieves all the tables in this schema.- Specified by:
doAllTablesin classBaseSchema- Throws:
SQLException- when the retrieval failed.
-
-