Class CockroachDBTable
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseSchemaObject<D,S>
-
- migratedb.core.internal.database.base.BaseTable<CockroachDBDatabase,CockroachDBSchema>
-
- migratedb.core.internal.database.cockroachdb.CockroachDBTable
-
- All Implemented Interfaces:
SchemaObject<CockroachDBDatabase,CockroachDBSchema>,Table<CockroachDBDatabase,CockroachDBSchema>
public class CockroachDBTable extends BaseTable<CockroachDBDatabase,CockroachDBSchema>
CockroachDB-specific table.Note that CockroachDB doesn't support table locks.
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseSchemaObject
database, jdbcTemplate, name, schema
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDrop()protected voiddoDropOnce()protected booleandoExists()Checks whether this table exists.protected booleandoExistsOnce()protected voiddoLock()Locks this table in this schema using a read/write pessimistic lock until the end of the current transaction.protected voiddoUnlock()For databases that require an explicit unlocking, not an implicit end-of-transaction one.-
Methods inherited from class migratedb.core.internal.database.base.BaseTable
exists, exists, lock, unlock
-
Methods inherited from class migratedb.core.internal.database.base.BaseSchemaObject
drop, getDatabase, getName, getSchema, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface migratedb.core.api.internal.database.base.SchemaObject
drop, getDatabase, getName, getSchema, toString
-
-
-
-
Method Detail
-
doDrop
protected void doDrop() throws SQLException- Specified by:
doDropin classBaseSchemaObject<CockroachDBDatabase,CockroachDBSchema>- Throws:
SQLException- when the drop failed.
-
doDropOnce
protected void doDropOnce() throws SQLException- Throws:
SQLException
-
doExists
protected boolean doExists() throws SQLExceptionDescription copied from class:BaseTableChecks whether this table exists.- Specified by:
doExistsin classBaseTable<CockroachDBDatabase,CockroachDBSchema>- Throws:
SQLException- when the check failed.
-
doExistsOnce
protected boolean doExistsOnce() throws SQLException- Throws:
SQLException
-
doLock
protected void doLock() throws SQLExceptionDescription copied from class:BaseTableLocks this table in this schema using a read/write pessimistic lock until the end of the current transaction. Note thatunlock()still needs to be called even if your database unlocks the table implicitly (in which casedoUnlock()may be a no-op) in order to maintain the lock count correctly.- Specified by:
doLockin classBaseTable<CockroachDBDatabase,CockroachDBSchema>- Throws:
SQLException- when this table in this schema could not be locked.
-
doUnlock
protected void doUnlock()
Description copied from class:BaseTableFor databases that require an explicit unlocking, not an implicit end-of-transaction one.- Overrides:
doUnlockin classBaseTable<CockroachDBDatabase,CockroachDBSchema>
-
-