Class CommonStoreImpl

  • All Implemented Interfaces:
    DBType
    Direct Known Subclasses:
    BigQuery, PostgreSQL

    public abstract class CommonStoreImpl
    extends java.lang.Object
    implements DBType
    • Field Detail

      • REQUOTE0

        protected static java.util.regex.Pattern REQUOTE0
      • REQUOTE1

        protected static java.util.regex.Pattern REQUOTE1
      • REQUOTE2

        protected static java.util.regex.Pattern REQUOTE2
    • Constructor Detail

      • CommonStoreImpl

        public CommonStoreImpl()
    • Method Detail

      • getSelectLimitClause

        public java.lang.String getSelectLimitClause​(int Start,
                                                     int Size)
        Specified by:
        getSelectLimitClause in interface DBType
      • getSubTypeMapping

        protected abstract ColumnType getSubTypeMapping​(java.lang.String Name,
                                                        java.lang.String TypeName,
                                                        ColumnType TildaType)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTypeMapping

        public StringStringPair getTypeMapping​(int Type,
                                               java.lang.String Name,
                                               int Size,
                                               java.lang.String TypeName)
                                        throws java.lang.Exception
        Specified by:
        getTypeMapping in interface DBType
        Throws:
        java.lang.Exception
      • createSchema

        public boolean createSchema​(Connection Con,
                                    Schema S)
                             throws java.lang.Exception
        Specified by:
        createSchema in interface DBType
        Throws:
        java.lang.Exception
      • createTable

        public boolean createTable​(Connection Con,
                                   Object Obj)
                            throws java.lang.Exception
        Specified by:
        createTable in interface DBType
        Throws:
        java.lang.Exception
      • createKeysEntry

        public boolean createKeysEntry​(Connection Con,
                                       Object Obj)
                                throws java.lang.Exception
        Specified by:
        createKeysEntry in interface DBType
        Throws:
        java.lang.Exception
      • dropView

        public boolean dropView​(Connection Con,
                                View V)
                         throws java.lang.Exception
        Specified by:
        dropView in interface DBType
        Throws:
        java.lang.Exception
      • dropView

        public boolean dropView​(Connection Con,
                                ViewMeta V,
                                boolean cascade)
                         throws java.lang.Exception
        Specified by:
        dropView in interface DBType
        Throws:
        java.lang.Exception
      • createView

        public boolean createView​(Connection Con,
                                  View V)
                           throws java.lang.Exception
        Specified by:
        createView in interface DBType
        Throws:
        java.lang.Exception
      • alterTableAddColumn

        public boolean alterTableAddColumn​(Connection com,
                                           Column col,
                                           java.lang.String defaultValue,
                                           java.lang.String temporaryDefaultValue)
                                    throws java.lang.Exception
        Specified by:
        alterTableAddColumn in interface DBType
        Throws:
        java.lang.Exception
      • alterTableDropColumn

        public boolean alterTableDropColumn​(Connection Con,
                                            Object Obj,
                                            java.lang.String ColumnName)
                                     throws java.lang.Exception
        Specified by:
        alterTableDropColumn in interface DBType
        Throws:
        java.lang.Exception
      • alterTableAlterColumnNull

        public boolean alterTableAlterColumnNull​(Connection Con,
                                                 Column Col,
                                                 java.lang.String DefaultValue)
                                          throws java.lang.Exception
        Specified by:
        alterTableAlterColumnNull in interface DBType
        Throws:
        java.lang.Exception
      • getColumnType

        public void getColumnType​(java.lang.StringBuilder Str,
                                  ColumnType T,
                                  java.lang.Integer S,
                                  ColumnMode M,
                                  boolean Collection,
                                  java.lang.Integer Precision,
                                  java.lang.Integer Scale)
        Specified by:
        getColumnType in interface DBType
      • getColumnType

        public abstract java.lang.String getColumnType​(ColumnType T,
                                                       java.lang.Integer S,
                                                       ColumnMode M,
                                                       boolean Collection,
                                                       java.lang.Integer Precision,
                                                       java.lang.Integer Scale)
      • getColumnTypeRaw

        public java.lang.String getColumnTypeRaw​(Column C,
                                                 boolean MultiOverride)
        Specified by:
        getColumnTypeRaw in interface DBType
      • getColumnTypeRaw

        public java.lang.String getColumnTypeRaw​(ColumnType Type,
                                                 int Size,
                                                 boolean isCollection)
        Specified by:
        getColumnTypeRaw in interface DBType
      • getColumnTypeRaw

        public abstract java.lang.String getColumnTypeRaw​(ColumnType Type,
                                                          int Size,
                                                          boolean Calculated,
                                                          boolean isCollection,
                                                          boolean MultiOverride)
      • getShortColumnVar

        public java.lang.String getShortColumnVar​(java.lang.String name)
        Specified by:
        getShortColumnVar in interface DBType
      • rewriteExpressionColumnQuoting

        public java.lang.String rewriteExpressionColumnQuoting​(java.lang.String expr)
        Specified by:
        rewriteExpressionColumnQuoting in interface DBType
      • getFullColumnVar

        public void getFullColumnVar​(java.lang.StringBuilder Str,
                                     java.lang.String SchemaName,
                                     java.lang.String TableName,
                                     java.lang.String ColumnName)
        Specified by:
        getFullColumnVar in interface DBType
      • getFullTableVar

        public void getFullTableVar​(java.lang.StringBuilder Str,
                                    java.lang.String SchemaName,
                                    java.lang.String TableName)
        Specified by:
        getFullTableVar in interface DBType
      • setArray

        public void setArray​(Connection C,
                             java.sql.PreparedStatement PS,
                             int i,
                             ColumnType Type,
                             java.util.List<java.sql.Array> allocatedArrays,
                             java.util.Collection<?> val)
                      throws java.lang.Exception
        Specified by:
        setArray in interface DBType
        Throws:
        java.lang.Exception
      • truncateTable

        public void truncateTable​(Connection C,
                                  java.lang.String schemaName,
                                  java.lang.String tableName,
                                  boolean cascade)
                           throws java.lang.Exception
        Specified by:
        truncateTable in interface DBType
        Throws:
        java.lang.Exception
      • alterTableAddIndexDDL

        public java.lang.String alterTableAddIndexDDL​(Index IX)
                                               throws java.lang.Exception
        Specified by:
        alterTableAddIndexDDL in interface DBType
        Throws:
        java.lang.Exception
      • alterTableAddIndex

        public boolean alterTableAddIndex​(Connection Con,
                                          Index IX)
                                   throws java.lang.Exception
        Specified by:
        alterTableAddIndex in interface DBType
        Throws:
        java.lang.Exception
      • alterTableRenameIndex

        public boolean alterTableRenameIndex​(Connection Con,
                                             Object Obj,
                                             java.lang.String OldName,
                                             java.lang.String NewName)
                                      throws java.lang.Exception
        Specified by:
        alterTableRenameIndex in interface DBType
        Throws:
        java.lang.Exception
      • moveTableView

        public boolean moveTableView​(Connection Con,
                                     Base base,
                                     java.lang.String oldSchemaName)
                              throws java.lang.Exception
        Specified by:
        moveTableView in interface DBType
        Throws:
        java.lang.Exception
      • renameTableView

        public boolean renameTableView​(Connection Con,
                                       Base base,
                                       java.lang.String oldName)
                                throws java.lang.Exception
        Specified by:
        renameTableView in interface DBType
        Throws:
        java.lang.Exception
      • renameTableColumn

        public boolean renameTableColumn​(Connection con,
                                         Column col,
                                         java.lang.String oldName)
                                  throws java.lang.Exception
        Specified by:
        renameTableColumn in interface DBType
        Throws:
        java.lang.Exception
      • getCurrentTimestamp

        public java.time.ZonedDateTime getCurrentTimestamp​(Connection Con)
                                                    throws java.lang.Exception
        Specified by:
        getCurrentTimestamp in interface DBType
        Throws:
        java.lang.Exception
      • getCurrentDateTime

        public java.time.ZonedDateTime getCurrentDateTime​(Connection Con)
                                                   throws java.lang.Exception
        Specified by:
        getCurrentDateTime in interface DBType
        Throws:
        java.lang.Exception
      • getCurrentDate

        public java.time.LocalDate getCurrentDate​(Connection Con)
                                           throws java.lang.Exception
        Specified by:
        getCurrentDate in interface DBType
        Throws:
        java.lang.Exception