Package com.gmt2001.datastore2
Class SQLiteStore2
java.lang.Object
com.gmt2001.datastore2.Datastore2
com.gmt2001.datastore2.SQLiteStore2
Provides a
Datastore2 driver for SQLite database v3.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()appendedbooleanIndicates if this driver prefers automatic backups to be enabled by defaultvoidPerforms periodic database maintenancestatic StringReturns the name of the SQLite database fileReturns 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, driverDispose, dslContext, findTable, findTableRequired, getConnection, init, init, init, instance, invalidateTableCache, meta, prepareConnection, tables, tablesAsync, testConnection, timestamp
-
Constructor Details
-
SQLiteStore2
public SQLiteStore2()Constructor
-
-
Method Details
-
getDbFile
Returns the name of the SQLite database file- 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
-
defaultBackupPreference
public boolean defaultBackupPreference()Description copied from class:Datastore2Indicates if this driver prefers automatic backups to be enabled by default- Overrides:
defaultBackupPreferencein classDatastore2- Returns:
trueif enabled by default
-
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
-
doMaintenance
public void doMaintenance()Description copied from class:Datastore2Performs periodic database maintenance- Overrides:
doMaintenancein classDatastore2
-