クラス MysqlRdbAdaptor

java.lang.Object
org.iplass.mtp.impl.rdb.adapter.RdbAdapter
org.iplass.mtp.impl.rdb.mysql.MysqlRdbAdaptor

public class MysqlRdbAdaptor extends RdbAdapter
  • フィールド詳細

    • dateMin

      long dateMin
    • dateMax

      long dateMax
  • コンストラクタの詳細

    • MysqlRdbAdaptor

      public MysqlRdbAdaptor()
  • メソッドの詳細

    • getConnection

      public Connection getConnection(String connectionFactoryName) throws SQLException
      オーバーライド:
      getConnection クラス内 RdbAdapter
      例外:
      SQLException
    • getDefaultQueryTimeout

      public int getDefaultQueryTimeout()
      定義:
      getDefaultQueryTimeout クラス内 RdbAdapter
    • setDefaultQueryTimeout

      public void setDefaultQueryTimeout(int defaultQueryTimeout)
    • getDefaultFetchSize

      public int getDefaultFetchSize()
      定義:
      getDefaultFetchSize クラス内 RdbAdapter
    • setDefaultFetchSize

      public void setDefaultFetchSize(int defaultFetchSize)
    • getMaxFetchSize

      public int getMaxFetchSize()
      定義:
      getMaxFetchSize クラス内 RdbAdapter
    • setMaxFetchSize

      public void setMaxFetchSize(int maxFetchSize)
    • isUseFractionalSecondsOnTimestamp

      public boolean isUseFractionalSecondsOnTimestamp()
    • setUseFractionalSecondsOnTimestamp

      public void setUseFractionalSecondsOnTimestamp(boolean useFractionalSecondsOnTimestamp)
    • getTimestampMethod

      public String getTimestampMethod()
      timestampMethodを取得します。
      戻り値:
      timestampMethod
    • setTimestampMethod

      public void setTimestampMethod(String timestampMethod)
      timestampMethodを設定します。
      パラメータ:
      timestampMethod - timestampMethod
    • createMultiInsertContext

      public MultiInsertContext createMultiInsertContext(Statement stmt)
      定義:
      createMultiInsertContext クラス内 RdbAdapter
    • dual

      public String dual()
      定義:
      dual クラス内 RdbAdapter
    • getDataTypeOf

      protected String getDataTypeOf(int sqlType, Integer lengthOrPrecision, Integer scale)
      定義:
      getDataTypeOf クラス内 RdbAdapter
    • rowLockExpression

      public String rowLockExpression()
      定義:
      rowLockExpression クラス内 RdbAdapter
    • systimestamp

      public String systimestamp()
      定義:
      systimestamp クラス内 RdbAdapter
    • toDateExpression

      public String toDateExpression(Date date)
      定義:
      toDateExpression クラス内 RdbAdapter
    • toTimeExpression

      public String toTimeExpression(Time time)
      定義:
      toTimeExpression クラス内 RdbAdapter
    • toTimeStampExpression

      public String toTimeStampExpression(Timestamp date)
      定義:
      toTimeStampExpression クラス内 RdbAdapter
    • toLimitSql

      public String toLimitSql(String selectSql, int limitCount, int offset, boolean asBind)
      定義:
      toLimitSql クラス内 RdbAdapter
    • toLimitSqlBindValue

      public Object[] toLimitSqlBindValue(int limitCount, int offset)
      定義:
      toLimitSqlBindValue クラス内 RdbAdapter
    • isDuplicateValueException

      public boolean isDuplicateValueException(SQLException e)
      定義:
      isDuplicateValueException クラス内 RdbAdapter
    • isDeadLock

      public boolean isDeadLock(SQLException e)
      定義:
      isDeadLock クラス内 RdbAdapter
    • isLockFailed

      public boolean isLockFailed(SQLException e)
      定義:
      isLockFailed クラス内 RdbAdapter
    • isCastFailed

      public boolean isCastFailed(SQLException e)
      定義:
      isCastFailed クラス内 RdbAdapter
    • addDate

      public String addDate(String dateExpression, int day)
      定義:
      addDate クラス内 RdbAdapter
    • checkStatusQuery

      public String checkStatusQuery()
      定義:
      checkStatusQuery クラス内 RdbAdapter
    • likePattern

      public String likePattern(String str)
      クラスからコピーされた説明: RdbAdapter
      EQLのLikeのパターン文字列で、 %、_、\を\でエスケープされているEQLでの文字列を、RDBネイティブなエスケープ構文に変換する。
      定義:
      likePattern クラス内 RdbAdapter
      パラメータ:
      str -
      戻り値:
    • escape

      public String escape()
      クラスからコピーされた説明: RdbAdapter
      Likeのエスケープ文字指定構文。
      定義:
      escape クラス内 RdbAdapter
      戻り値:
    • sanitize

      public String sanitize(String str)
      オーバーライド:
      sanitize クラス内 RdbAdapter
    • castExp

      public String[] castExp(int sqlType, Integer lengthOrPrecision, Integer scale)
      オーバーライド:
      castExp クラス内 RdbAdapter
    • cast

      public CharSequence cast(int fromSqlType, int toSqlType, CharSequence valExpr, Integer lengthOrPrecision, Integer scale)
      オーバーライド:
      cast クラス内 RdbAdapter
    • tableAlias

      public String tableAlias(String selectSql)
      定義:
      tableAlias クラス内 RdbAdapter
    • isSupportGroupingExtention

      public boolean isSupportGroupingExtention(GroupBy.RollType rollType)
      定義:
      isSupportGroupingExtention クラス内 RdbAdapter
    • rollUpStart

      public String rollUpStart(GroupBy.RollType rollType)
      定義:
      rollUpStart クラス内 RdbAdapter
    • rollUpEnd

      public String rollUpEnd(GroupBy.RollType rollType)
      定義:
      rollUpEnd クラス内 RdbAdapter
    • seqNextSelectSql

      public String seqNextSelectSql(String sequenceName, int tenantId, String entityDefId)
      定義:
      seqNextSelectSql クラス内 RdbAdapter
    • initBlob

      public String initBlob()
      定義:
      initBlob クラス内 RdbAdapter
    • isUseSubQueryForIndexJoin

      public boolean isUseSubQueryForIndexJoin()
      定義:
      isUseSubQueryForIndexJoin クラス内 RdbAdapter
    • getOptimizerHint

      public String getOptimizerHint()
      定義:
      getOptimizerHint クラス内 RdbAdapter
    • getOptimizerHintPlace

      public HintPlace getOptimizerHintPlace()
      定義:
      getOptimizerHintPlace クラス内 RdbAdapter
    • getOptimizerHintBracket

      public String[] getOptimizerHintBracket()
      定義:
      getOptimizerHintBracket クラス内 RdbAdapter
    • isSupportOptimizerHint

      public boolean isSupportOptimizerHint()
      定義:
      isSupportOptimizerHint クラス内 RdbAdapter
    • setSupportOptimizerHint

      public void setSupportOptimizerHint(boolean supportOptimizerHint)
    • isSupportTableHint

      public boolean isSupportTableHint()
      定義:
      isSupportTableHint クラス内 RdbAdapter
    • getTableHintBracket

      public String[] getTableHintBracket()
      定義:
      getTableHintBracket クラス内 RdbAdapter
    • appendSortSpecExpression

      public void appendSortSpecExpression(StringBuilder sb, CharSequence sortValue, SortSpec.SortType sortType, SortSpec.NullOrderingSpec nullOrderingSpec)
      定義:
      appendSortSpecExpression クラス内 RdbAdapter
    • convertTZ

      public String[] convertTZ(String to)
      クラスからコピーされた説明: RdbAdapter
      timezoneを変更したtimestampを取得する関数。 変換前のtimestampはデフォルトタイムゾーン(DBのタイムゾーンもしくはDBセッションのタイムゾーン)と同一である想定。
      定義:
      convertTZ クラス内 RdbAdapter
      パラメータ:
      to -
      戻り値:
      [0]がpre文字列、[1]がpost文字列
    • isEnableInPartitioning

      public boolean isEnableInPartitioning()
      定義:
      isEnableInPartitioning クラス内 RdbAdapter
    • getInPartitioningSize

      public int getInPartitioningSize()
      定義:
      getInPartitioningSize クラス内 RdbAdapter
    • deleteTemporaryTable

      public String deleteTemporaryTable(String tableName)
      クラスからコピーされた説明: RdbAdapter
      TemporaryTableを削除(global temporary tableの場合はデータを削除する)するSQLを生成。
      定義:
      deleteTemporaryTable クラス内 RdbAdapter
      パラメータ:
      tableName -
      戻り値:
    • isSupportGlobalTemporaryTable

      public boolean isSupportGlobalTemporaryTable()
      クラスからコピーされた説明: RdbAdapter
      global temporary tableをサポートしている場合はtrue
      定義:
      isSupportGlobalTemporaryTable クラス内 RdbAdapter
      戻り値:
    • createLocalTemporaryTable

      public String createLocalTemporaryTable(String tableName, String baseTableName, String[] baseColumnName)
      クラスからコピーされた説明: RdbAdapter
      ローカルなTemporaryTableを作成する。
      定義:
      createLocalTemporaryTable クラス内 RdbAdapter
    • isSupportAutoClearTemporaryTableWhenCommit

      public boolean isSupportAutoClearTemporaryTableWhenCommit()
      定義:
      isSupportAutoClearTemporaryTableWhenCommit クラス内 RdbAdapter
    • isSupportGroupingExtentionWithOrderBy

      public boolean isSupportGroupingExtentionWithOrderBy()
      定義:
      isSupportGroupingExtentionWithOrderBy クラス内 RdbAdapter
    • isSupportGroupingExtention

      public boolean isSupportGroupingExtention()
      定義:
      isSupportGroupingExtention クラス内 RdbAdapter
    • isEnableBindHint

      public boolean isEnableBindHint()
      クラスからコピーされた説明: RdbAdapter
      bindヒント句を有効化するか否か
      定義:
      isEnableBindHint クラス内 RdbAdapter
      戻り値:
    • setEnableBindHint

      public void setEnableBindHint(boolean enableBindHint)
    • isAlwaysBind

      public boolean isAlwaysBind()
      クラスからコピーされた説明: RdbAdapter
      EQLをSQLに変換する際、常にバインド変数化するか否か。
      定義:
      isAlwaysBind クラス内 RdbAdapter
      戻り値:
    • getBatchSize

      public int getBatchSize()
      クラスからコピーされた説明: RdbAdapter
      バッチ更新利用する際の推奨バッチサイズ。
      定義:
      getBatchSize クラス内 RdbAdapter
      戻り値:
    • setBatchSize

      public void setBatchSize(int batchSize)
    • getThresholdCountOfUsePrepareStatement

      public int getThresholdCountOfUsePrepareStatement()
      クラスからコピーされた説明: RdbAdapter
      複数の更新(追加)を一括で処理する際の、PrepareStatementを利用するか否かを判断するための閾値。
      定義:
      getThresholdCountOfUsePrepareStatement クラス内 RdbAdapter
      戻り値:
    • setThresholdCountOfUsePrepareStatement

      public void setThresholdCountOfUsePrepareStatement(int thresholdCountOfUsePrepareStatement)
    • createBulkInsertContext

      public BulkInsertContext createBulkInsertContext()
      定義:
      createBulkInsertContext クラス内 RdbAdapter
    • createBulkUpdateContext

      public BulkUpdateContext createBulkUpdateContext()
      定義:
      createBulkUpdateContext クラス内 RdbAdapter
    • createBulkDeleteContext

      public BulkDeleteContext createBulkDeleteContext()
      定義:
      createBulkDeleteContext クラス内 RdbAdapter
    • getMultiTableUpdateMethod

      public MultiTableUpdateMethod getMultiTableUpdateMethod()
      定義:
      getMultiTableUpdateMethod クラス内 RdbAdapter
    • getTableNames

      public ResultSet getTableNames(String tableNamePattern, Connection con) throws SQLException
      定義:
      getTableNames クラス内 RdbAdapter
      例外:
      SQLException
    • isSupportWindowFunction

      public boolean isSupportWindowFunction()
      定義:
      isSupportWindowFunction クラス内 RdbAdapter
    • setSupportWindowFunction

      public void setSupportWindowFunction(boolean supportWindowFunction)
    • setLocalTemporaryTableManageOutsideTransaction

      public void setLocalTemporaryTableManageOutsideTransaction(boolean localTemporaryTableManageOutsideTransaction)
      ローカル一時テーブルをトランザクションの外で管理するかを指定します。

      5.6.5から利用可能なGTIDを利用する場合trueを指定する必要があります。
      但し、
      無効な参照です
      #setLocalTemporaryTableCreateAtDataSource
      trueを指定した場合は指定する必要はありません。

      パラメータ:
      localTemporaryTableManageOutsideTransaction - トランザクションの外で管理する場合はtrueを指定します。
    • setLocalTemporaryTableCreatedByDataSource

      public void setLocalTemporaryTableCreatedByDataSource(boolean localTemporaryTableCreatedByDataSource)
      ローカル一時テーブルがデータソースで作成されるかを指定します。
      パラメータ:
      localTemporaryTableCreatedByDataSource - データソースで作成される場合はtrueを指定します。
    • getViewSubQueryAlias

      public String getViewSubQueryAlias()
      クラスからコピーされた説明: RdbAdapter
      ビューのサブクエリエイリアスを取得します。
      オーバーライド:
      getViewSubQueryAlias クラス内 RdbAdapter
      戻り値:
      エイリアス
    • setViewSubQueryAlias

      public void setViewSubQueryAlias(String alias)
    • getMaxViewNameLength

      public int getMaxViewNameLength()
      クラスからコピーされた説明: RdbAdapter
      ビュー名の最大長を取得します。
      オーバーライド:
      getMaxViewNameLength クラス内 RdbAdapter
      戻り値:
      ビュー名の最大長。0未満の場合は無制限。
    • setMaxViewNameLength

      public void setMaxViewNameLength(int length)
    • createViewColumnSql

      public String createViewColumnSql(int colNo, String colName)
      クラスからコピーされた説明: RdbAdapter
      ビューカラムのSQLを作成します。
      定義:
      createViewColumnSql クラス内 RdbAdapter
      パラメータ:
      colNo - カラム番号
      colName - カラム名
      戻り値:
      ビューカラムSQL
    • createBinaryViewColumnSql

      public String createBinaryViewColumnSql(int colNo, String colName, String lobIdSuffix)
      クラスからコピーされた説明: RdbAdapter
      Binary型のビューカラムのSQLを作成します。
      定義:
      createBinaryViewColumnSql クラス内 RdbAdapter
      パラメータ:
      colName - カラム名
      lobIdSuffix - ロブIDカラム接尾辞
      戻り値:
      ビューカラムSQL
    • createLongTextViewColumnSql

      public String createLongTextViewColumnSql(int colNo, String colName, String lobIdSuffix)
      クラスからコピーされた説明: RdbAdapter
      LongText型のビューカラムのSQLを作成します。
      定義:
      createLongTextViewColumnSql クラス内 RdbAdapter
      パラメータ:
      colName - カラム名
      lobIdSuffix - LobIDカラム接尾辞
      戻り値:
      ビューカラムSQL
    • toCreateViewDDL

      public String toCreateViewDDL(String viewName, String selectSql, boolean withDropView)
      クラスからコピーされた説明: RdbAdapter
      指定のSELECT文をビュー作成DDLにします。
      定義:
      toCreateViewDDL クラス内 RdbAdapter
      パラメータ:
      viewName - ビュー名
      selectSql - SELECT文
      withDropView - ビュー削除も含める
      戻り値:
      ビュー作成DDL
    • isNeedMultiTableTrick

      public boolean isNeedMultiTableTrick()
      クラスからコピーされた説明: RdbAdapter
      Multi-Table Trickを利用するか否かを指定。 MySQL用の設定項目。
      オーバーライド:
      isNeedMultiTableTrick クラス内 RdbAdapter
      戻り値:
    • setNeedMultiTableTrick

      public void setNeedMultiTableTrick(boolean needMultiTableTrick)
    • getMultiTableTrickClauseForUpdate

      public String getMultiTableTrickClauseForUpdate()
      クラスからコピーされた説明: RdbAdapter
      Multi-Table Trickで利用する句。 MySQL用の設定項目。
      オーバーライド:
      getMultiTableTrickClauseForUpdate クラス内 RdbAdapter
      戻り値:
    • setMultiTableTrickClauseForUpdate

      public void setMultiTableTrickClauseForUpdate(String multiTableTrickClauseForUpdate)
    • isOptimizeCountQuery

      public boolean isOptimizeCountQuery()
    • setOptimizeCountQuery

      public void setOptimizeCountQuery(boolean optimizeCountQuery)
    • countQuery

      public UnaryOperator<CharSequence> countQuery(Query q)
      オーバーライド:
      countQuery クラス内 RdbAdapter
    • getRdbTypeAdapter

      public BaseRdbTypeAdapter getRdbTypeAdapter(Object value)
      オーバーライド:
      getRdbTypeAdapter クラス内 RdbAdapter
    • getRdbTypeAdapter

      public BaseRdbTypeAdapter getRdbTypeAdapter(PropertyType propType)
      オーバーライド:
      getRdbTypeAdapter クラス内 RdbAdapter