クラス TableSchema


  • public abstract class TableSchema
    extends Object
    • コンストラクタの詳細

      • TableSchema

        public TableSchema​(String name)
    • メソッドの詳細

      • addColumnDefinition

        protected void addColumnDefinition​(String columnName,
                                           String... dataTypeAndOptions)
        Adds an unique constraint.

        For example,

         addUniqueConstraint("id","name")  converted to "UNIQUE (id, name)"
         
        パラメータ:
        columnName -
        dataTypeAndOptions -
      • addUniqueConstraint

        protected void addUniqueConstraint​(String... uniqueColumnPair)
        Adds an unique constraint.

        For example,

         addUniqueConstraint("id","name")  converted to "UNIQUE (id, name)"
         
        パラメータ:
        uniqueColumnPair -
      • getColumnNames

        public List<String> getColumnNames()
      • getName

        public String getName()
      • getTableSchema

        public String getTableSchema()
        Gets a table schema.
        戻り値:
      • getIndexSchema

        public String getIndexSchema​(String... columns)
      • setPrimaryKey

        protected void setPrimaryKey​(String... attributes)
        Sets attributes as primary key attributes.

        For example,

         setPrimaryKey("id","name")  converted to "PRIMARY KEY (id, name)"
         
        パラメータ:
        attributes -