Package dev.frostlake.storage
Class StorageEngine
java.lang.Object
dev.frostlake.storage.StorageEngine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloneTableData(String sourceQualifiedName, String targetQualifiedName) voidcreateTable(String qualifiedName, Table tableMetadata) voidgetTableStorage(String qualifiedName) booleanbooleanbooleanbooleanvoidrenameTable(String oldQualifiedName, String newQualifiedName) ALTER TABLE a RENAME TO b: move the row storage from the old key to the new one.voidsetEnforcePrimaryKey(boolean enforce) voidsetEnforceUniqueKey(boolean enforce) voidsetTimeTravelEnabled(boolean enabled) voidTake one time-travel snapshot of every table mutated since the last call, then reset.voidswapTables(String fqNameA, String fqNameB) ALTER TABLE a SWAP WITH b: exchange the row storage of two tables (their structure is assumed compatible).voidtruncateTable(String qualifiedName)
-
Constructor Details
-
StorageEngine
public StorageEngine()
-
-
Method Details
-
setEnforcePrimaryKey
public void setEnforcePrimaryKey(boolean enforce) -
setEnforceUniqueKey
public void setEnforceUniqueKey(boolean enforce) -
isEnforcePrimaryKey
public boolean isEnforcePrimaryKey() -
isEnforceUniqueKey
public boolean isEnforceUniqueKey() -
setTimeTravelEnabled
public void setTimeTravelEnabled(boolean enabled) -
isTimeTravelEnabled
public boolean isTimeTravelEnabled() -
snapshotDirtyTables
public void snapshotDirtyTables()Take one time-travel snapshot of every table mutated since the last call, then reset. -
createTable
-
dropTable
-
hasTable
-
swapTables
ALTER TABLE a SWAP WITH b: exchange the row storage of two tables (their structure is assumed compatible). -
renameTable
ALTER TABLE a RENAME TO b: move the row storage from the old key to the new one. -
getTableStorage
-
truncateTable
-
cloneTableData
-