Class H2Store2

java.lang.Object
com.gmt2001.datastore2.Datastore2
com.gmt2001.datastore2.H2Store2

public final class H2Store2 extends Datastore2
Provides a Datastore2 driver for H2 database v2.x
Author:
gmt2001
  • Constructor Details

    • H2Store2

      public H2Store2()
      Constructor
  • Method Details

    • getDbFile

      public static String getDbFile()
      Returns the name of the H2 database file, without the trailing .mv.db
      Returns:
      the name of the database file
    • longTextDataType

      public DataType<String> longTextDataType()
      Description copied from class: Datastore2
      Returns the DataType representing the LONGTEXT equivalent SQL data type for the driver
      Specified by:
      longTextDataType in class Datastore2
      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 class Datastore2
      Returns:
      true if supported
    • backupFileName

      public String backupFileName()
      Description copied from class: Datastore2
      Returns the default backup filename, which is usually the database name with Datastore2.timestamp() appended
      Overrides:
      backupFileName in class Datastore2
      Returns:
      the filename
    • backup

      public void backup(String fileName)
      Description copied from class: Datastore2
      Performs a backup of the database to the dbbackup folder
      Overrides:
      backup in class Datastore2
      Parameters:
      fileName - the name of the backup file
    • restoreBackup

      public void restoreBackup(String fileName) throws FileNotFoundException
      Description copied from class: Datastore2
      Restores a database from the specified backup file, which must be in the dbbackup folder
      Overrides:
      restoreBackup in class Datastore2
      Parameters:
      fileName - the name of the backup file
      Throws:
      FileNotFoundException - if the backup file can not be found