Class DatabaseSystem

java.lang.Object
com.mckoi.database.TransactionSystem
com.mckoi.database.DatabaseSystem

public final class DatabaseSystem extends TransactionSystem
This class provides information about shared resources available for the entire database system running in this VM. Shared information includes configuration details, DataCellCache, plug-ins, user management, etc.
Author:
Tobias Downer
  • Constructor Details

    • DatabaseSystem

      public DatabaseSystem()
      Constructor.
  • Method Details

    • init

      public void init(DBConfig config)
      Inits the DatabaseSystem with the configuration properties of the system. This can only be called once, and should be called at database boot time.
      Overrides:
      init in class TransactionSystem
    • logQueries

      public boolean logQueries()
      If query logging is enabled (all queries are output to 'commands.log' in the log directory), this returns true. Otherwise it returns false.
    • dispose

      public void dispose()
      Disposes all the resources associated with this DatabaseSystem and invalidates this object.
      Overrides:
      dispose in class TransactionSystem
    • getStatementCache

      public StatementCache getStatementCache()
      Returns the StatementCache that is used to cache StatementTree objects that are being queried by the database. This is used to reduce the SQL command parsing overhead.

      If this method returns 'null' then statement caching is disabled.

    • prepareTransactionCheckConstraint

      public Transaction.CheckExpression prepareTransactionCheckConstraint(DataTableDef table_def, Transaction.CheckExpression check)
      Given a Transaction.CheckExpression, this will prepare the expression and return a new prepared CheckExpression.

      A DatabaseSystem resolves the variables (ignoring case if necessary) and the functions of the expression.

      Overrides:
      prepareTransactionCheckConstraint in class TransactionSystem