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 TypeMethodDescriptionvoid
Performs a backup of the database to thedbbackup
folderReturns the default backup filename, which is usually the database name withDatastore2.timestamp()
appendedvoid
Performs periodic database maintenancestatic String
Returns the name of the SQLite database fileReturns theDataType
representing theLONGTEXT
equivalent SQL data type for the drivervoid
restoreBackup
(String fileName) Restores a database from the specified backup file, which must be in thedbbackup
folderboolean
Indicates 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:Datastore2
Returns theDataType
representing theLONGTEXT
equivalent SQL data type for the driver- Specified by:
longTextDataType
in classDatastore2
- Returns:
- the DataType
-
supportsBackup
public boolean supportsBackup()Description copied from class:Datastore2
Indicates if this driver supports making backups without an external tool- Overrides:
supportsBackup
in classDatastore2
- Returns:
true
if supported
-
backupFileName
Description copied from class:Datastore2
Returns the default backup filename, which is usually the database name withDatastore2.timestamp()
appended- Overrides:
backupFileName
in classDatastore2
- Returns:
- the filename
-
backup
Description copied from class:Datastore2
Performs a backup of the database to thedbbackup
folder- Overrides:
backup
in classDatastore2
- Parameters:
fileName
- the name of the backup file
-
restoreBackup
Description copied from class:Datastore2
Restores a database from the specified backup file, which must be in thedbbackup
folder- Overrides:
restoreBackup
in 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:Datastore2
Performs periodic database maintenance- Overrides:
doMaintenance
in classDatastore2
-