[ データ親子紐づけテーブル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\ColumnDBカラム
createTable()
Phalcon\Db\Adapter\PdoのcreateTableで構築。 但し、細かなoptionが設定できないので、必要に応じてcreateTableByDDLと使い分ける。
createTableByDDL()
DBコンフィグからアダプター名を取得し、そのアダプタ名をディレクトリ名としてDDLを取得し、実行する。
createView() : boolean
| throws | |
|---|---|
boolean
dropTable()
| throws | |
|---|---|
getAutoIncrement( $autoinc) : boolean
| throws |
|---|
テーブル構築定義ファイルのauto_increment 設定値
booleanColumn autoIncrement設定値
getColumn(array $columnSetting) : array<mixed,\Phalcon\Db\Column>
| throws |
|---|
arrayカラム設定情報
array<mixed,\Phalcon\Db\Column>DBカラムオブジェクト
getColumnSize(string $typeDef, integer $size) : integer
stringTypeを指定する文字列
integerカラムサイズ
integerカラムのサイズ
getColumnType(\SCC\Api\Model\Creator\Extend\unknown $typeDef) : integer
| throws |
|---|
\SCC\Api\Model\Creator\Extend\unknownTypeを指定する文字列
integerColumnのType定数
getConnection() : \Phalcon\Db\Adapter\Pdo
\Phalcon\Db\Adapter\PdoDB接続用のアダプタ(PDO)
getDbTableAdminNm() : string
stringデータテーブルの設定管理画面での表示名称
getDbTableInsertName() : \SCC\Api\Model\Creator\Extend\データテーブルの名称の動的部分
\SCC\Api\Model\Creator\Extend\データテーブルの名称の動的部分
getDefault( $default) : string
テーブル構築定義ファイルのデフォルト値 設定値
stringデフォルト値
getNotNull( $nullinput) : boolean
| throws |
|---|
booleanColumn 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\PdoDB接続用のアダプタ(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 :