Package com.gmt2001.datastore2
Class H2Store2
java.lang.Object
com.gmt2001.datastore2.Datastore2
com.gmt2001.datastore2.H2Store2
Provides a
Datastore2 driver for H2 database v2.x- Author:
- gmt2001
-
Field Summary
Fields inherited from class com.gmt2001.datastore2.Datastore2
PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms a backup of the database to thedbbackupfolderReturns the default backup filename, which is usually the database name withDatastore2.timestamp()appendedstatic StringReturns the name of the H2 database file, without the trailing.mv.dbReturns theDataTyperepresenting theLONGTEXTequivalent SQL data type for the drivervoidrestoreBackup(String fileName) Restores a database from the specified backup file, which must be in thedbbackupfolderbooleanIndicates if this driver supports making backups without an external toolMethods inherited from class com.gmt2001.datastore2.Datastore2
backup, checkVersion, dispose, doMaintenance, driverDispose, dslContext, findTable, findTableRequired, getConnection, init, init, init, instance, invalidateTableCache, meta, prepareConnection, tables, tablesAsync, testConnection, timestamp
-
Constructor Details
-
H2Store2
public H2Store2()Constructor
-
-
Method Details
-
getDbFile
Returns the name of the H2 database file, without the trailing.mv.db- Returns:
- the name of the database file
-
longTextDataType
Description copied from class:Datastore2Returns theDataTyperepresenting theLONGTEXTequivalent SQL data type for the driver- Specified by:
longTextDataTypein classDatastore2- Returns:
- the DataType
-
supportsBackup
public boolean supportsBackup()Description copied from class:Datastore2Indicates if this driver supports making backups without an external tool- Overrides:
supportsBackupin classDatastore2- Returns:
trueif supported
-
backupFileName
Description copied from class:Datastore2Returns the default backup filename, which is usually the database name withDatastore2.timestamp()appended- Overrides:
backupFileNamein classDatastore2- Returns:
- the filename
-
backup
Description copied from class:Datastore2Performs a backup of the database to thedbbackupfolder- Overrides:
backupin classDatastore2- Parameters:
fileName- the name of the backup file
-
restoreBackup
Description copied from class:Datastore2Restores a database from the specified backup file, which must be in thedbbackupfolder- Overrides:
restoreBackupin classDatastore2- Parameters:
fileName- the name of the backup file- Throws:
FileNotFoundException- if the backup file can not be found
-