Documentation of 'org.hsqldb.SchemaManager' Java class
SchemaManager
org.hsqldb

Class SchemaManager



  • public class SchemaManager
    extends java.lang.Object
    Manages all SCHEMA related database objects
    Since:
    1.8.0
    • Field Detail

      • dataChangeTable

        public Table dataChangeTable
    • Constructor Detail

      • SchemaManager

        public SchemaManager(Database database)
    • Method Detail

      • setSchemaChangeTimestamp

        public void setSchemaChangeTimestamp()
      • getSchemaChangeTimestamp

        public long getSchemaChangeTimestamp()
      • createPublicSchema

        public void createPublicSchema()
      • dropSchema

        public void dropSchema(Session session,
                               java.lang.String name,
                               boolean cascade)
      • release

        public void release()
      • getSchemaNamesArray

        public java.lang.String[] getSchemaNamesArray()
      • getAllSchemas

        public Schema[] getAllSchemas()
      • toSchemaOwner

        public Grantee toSchemaOwner(java.lang.String name)
      • schemaExists

        public boolean schemaExists(java.lang.String name)
      • getSchemaHsqlName

        public HsqlNameManager.HsqlName getSchemaHsqlName(java.lang.String name)
        If schemaName is null, return the default schema name, else return the HsqlName object for the schema. If schemaName does not exist, throw.
      • getSchemaName

        public java.lang.String getSchemaName(java.lang.String name)
        Same as above, but return string
      • findSchema

        public Schema findSchema(java.lang.String name)
      • dropSchemas

        public void dropSchemas(Session session,
                                Grantee grantee,
                                boolean cascade)
        drop all schemas with the given authorisation
      • hasSchemas

        public boolean hasSchemas(Grantee grantee)
      • getAllTables

        public HsqlArrayList getAllTables(boolean withLobTables)
        Returns an HsqlArrayList containing references to all non-system tables and views. This includes all tables and views registered with this Database.
      • getTables

        public HashMappedList getTables(java.lang.String schema)
      • getTable

        public Table getTable(Session session,
                              java.lang.String name,
                              java.lang.String schema)
        Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name. It excludes any temp tables created in other Sessions. Throws if the table does not exist in the context.
      • getUserTable

        public Table getUserTable(Session session,
                                  java.lang.String name,
                                  java.lang.String schema)
        Returns the specified user-defined table or view visible within the context of the specified Session. It excludes system tables and any temp tables created in different Sessions. Throws if the table does not exist in the context.
      • findUserTable

        public Table findUserTable(Session session,
                                   java.lang.String name,
                                   java.lang.String schemaName)
        Returns the specified user-defined table or view visible within the context of the specified schema. It excludes system tables. Returns null if the table does not exist in the context.
      • findSessionTable

        public Table findSessionTable(Session session,
                                      java.lang.String name)
        Returns the specified session context table. Returns null if the table does not exist in the context.
      • dropTableOrView

        public void dropTableOrView(Session session,
                                    Table table,
                                    boolean cascade)
        Drops the specified user-defined view or table from this Database object.

        The process of dropping a table or view includes:

        1. checking that the specified Session's currently connected User has the right to perform this operation and refusing to proceed if not by throwing.
        2. checking for referential constraints that conflict with this operation and refusing to proceed if they exist by throwing.
        3. removing the specified Table from this Database object.
        4. removing any exported foreign keys Constraint objects held by any tables referenced by the table to be dropped. This is especially important so that the dropped Table ceases to be referenced, eventually allowing its full garbage collection.

        Parameters:
        session - the connected context in which to perform this operation
        table - if true and if the Table to drop does not exist, fail silently, else throw
        cascade - true if the name argument refers to a View
      • setTable

        public void setTable(int index,
                             Table table)
      • getTableIndex

        public int getTableIndex(Table table)
        Returns index of a table or view in the HashMappedList that contains the table objects for this Database.
        Parameters:
        table - the Table object
        Returns:
        the index of the specified table or view, or -1 if not found
      • recompileDependentObjects

        public void recompileDependentObjects(OrderedHashSet tableSet)
      • recompileDependentObjects

        public void recompileDependentObjects(Table table)
        After addition or removal of columns and indexes all views that reference the table should be recompiled.
      • getCollation

        public Collation getCollation(Session session,
                                      java.lang.String name,
                                      java.lang.String schemaName)
      • getSequence

        public NumberSequence getSequence(java.lang.String name,
                                          java.lang.String schemaName,
                                          boolean raise)
      • getUserDefinedType

        public Type getUserDefinedType(java.lang.String name,
                                       java.lang.String schemaName,
                                       boolean raise)
      • getDomainOrUDT

        public Type getDomainOrUDT(java.lang.String name,
                                   java.lang.String schemaName,
                                   boolean raise)
      • getDomain

        public Type getDomain(java.lang.String name,
                              java.lang.String schemaName,
                              boolean raise)
      • getDistinctType

        public Type getDistinctType(java.lang.String name,
                                    java.lang.String schemaName,
                                    boolean raise)
      • getSchemaObject

        public SchemaObject getSchemaObject(java.lang.String name,
                                            java.lang.String schemaName,
                                            int type)
      • getCharacterSet

        public SchemaObject getCharacterSet(Session session,
                                            java.lang.String name,
                                            java.lang.String schemaName)
      • findSchemaObject

        public SchemaObject findSchemaObject(java.lang.String name,
                                             java.lang.String schemaName,
                                             int type)
      • databaseObjectIterator

        public Iterator databaseObjectIterator(java.lang.String schemaName,
                                               int type)
      • databaseObjectIterator

        public Iterator databaseObjectIterator(int type)
      • getReferencesToSchema

        public MultiValueHashMap getReferencesToSchema(java.lang.String schemaName)
      • addSchemaObject

        public void addSchemaObject(SchemaObject object)
      • removeSchemaObjects

        public void removeSchemaObjects(OrderedHashSet set)
      • getObjectName

        public HsqlNameManager.HsqlName getObjectName(java.lang.String name,
                                                      java.lang.String schema,
                                                      int type)
      • getSQLArray

        public java.lang.String[] getSQLArray()
      • getTablePropsSQL

        public java.lang.String[] getTablePropsSQL(boolean withHeader)
      • getTableSpaceSQL

        public java.lang.String[] getTableSpaceSQL()
      • getIndexRootsSQL

        public java.lang.String[] getIndexRootsSQL()
      • getCommentsArray

        public java.lang.String[] getCommentsArray()
      • setTempIndexRoots

        public void setTempIndexRoots(long[][] roots)
      • getIndexRoots

        public long[][] getIndexRoots(Session session)
      • setIndexRoots

        public void setIndexRoots(long[][] roots)
        called after the completion of defrag
      • setDefaultTableType

        public void setDefaultTableType(int type)
      • getDefaultTableType

        public int getDefaultTableType()
      • createSystemTables

        public void createSystemTables()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.