[ データワークフローテーブルDBテーブル自動生成クラス ]
DBテーブル自動生成共通部分の実装。
jsonの定義ファイルからPhalconのクラスを使用して構築する方法とDDLを流して構築する方法を用意。 jsonからの場合、optionの設定など一部細かいチューニングができない。 その場合は、DDLから構築する方法で実装すること。
package |
Default |
---|
__construct()
addIndex(string $table_nm, array $cols, integer $idx)
throws | |
---|---|
string
テーブル名
array
インデックスを張るフィールドのリスト
integer
インデックス名称の番号
createColumn(string $colName, array $setting) : \SCC\Api\Model\Creator\Extend\Phalcon\Db\Column
throws |
---|
string
カラム名称
array
カラム定義
\SCC\Api\Model\Creator\Extend\Phalcon\Db\Column
DBカラム
createTable()
Phalcon\Db\Adapter\PdoのcreateTableで構築。 但し、細かなoptionが設定できないので、必要に応じてcreateTableByDDLと使い分ける。
createTableByDDL()
DBコンフィグからアダプター名を取得し、そのアダプタ名をディレクトリ名としてDDLを取得し、実行する。
dropTable()
throws | |
---|---|
getAutoIncrement( $autoinc) : boolean
throws |
---|
テーブル構築定義ファイルのauto_increment 設定値
boolean
Column autoIncrement設定値
getColumn(array $columnSetting) : array<mixed,\Phalcon\Db\Column>
throws |
---|
array
カラム設定情報
array<mixed,\Phalcon\Db\Column>
DBカラムオブジェクト
getColumnSize(string $typeDef, integer $size) : integer
string
Typeを指定する文字列
integer
カラムサイズ
integer
カラムのサイズ
getColumnType(\SCC\Api\Model\Creator\Extend\unknown $typeDef) : integer
throws |
---|
\SCC\Api\Model\Creator\Extend\unknown
Typeを指定する文字列
integer
ColumnのType定数
getConnection() : \Phalcon\Db\Adapter\Pdo
\Phalcon\Db\Adapter\Pdo
DB接続用のアダプタ(PDO)
getDbTableAdminNm() : string
string
データテーブルの設定管理画面での表示名称
getDbTableInsertName() : \SCC\Api\Model\Creator\Extend\データテーブルの名称の動的部分
\SCC\Api\Model\Creator\Extend\データテーブルの名称の動的部分
getDefault( $default) : string
テーブル構築定義ファイルのデフォルト値 設定値
string
デフォルト値
getNotNull( $nullinput) : boolean
throws |
---|
boolean
Column notNull設定値
getOptions( $settings) : \SCC\Api\Model\Creator\Extend\$options
\SCC\Api\Model\Creator\Extend\$options
オプション設定値
getTemplateName()
setConnection(\Phalcon\Db\Adapter\Pdo $con)
\Phalcon\Db\Adapter\Pdo
DB接続用のアダプタ(PDO)
setDbTableAdminNm(string $db_table_admin_nm)
string
データテーブルの設定管理画面での表示名称
setDbTableInsertName(string $db_table_nm)
string
データテーブルの名称の動的部分
setIndex( $table_nm, $settings)
テーブル名
テーブル構築定義ファイル
NULL_OK
NULL_NG
logger :
connection :
dbTableNm :
dbTableAdminNm :