このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
apricot:usage:ja:database [2020/08/20 21:33] y2sunlight [SQLファイル] |
apricot:usage:ja:database [2020/09/17 15:05] (現在) y2sunlight [Idiormの設定ファイル] |
||
---|---|---|---|
行 15: | 行 15: | ||
* [[apricot: | * [[apricot: | ||
* [[apricot: | * [[apricot: | ||
+ | * [[apricot: | ||
+ | * [[apricot: | ||
+ | * [[apricot: | ||
* [[apricot: | * [[apricot: | ||
行 23: | 行 26: | ||
Apricotでは、ORマッパーに[[basic-library: | Apricotでは、ORマッパーに[[basic-library: | ||
- | Idiormの典型的な使用例を示します: | + | Idiorm の典型的な使用例を示します: |
<code php> | <code php> | ||
行 52: | 行 55: | ||
[ | [ | ||
' | ' | ||
- | ' | ||
' | ' | ||
+ | ' | ||
], | ], | ||
' | ' | ||
行 59: | 行 62: | ||
' | ' | ||
' | ' | ||
+ | ' | ||
' | ' | ||
+ | ' | ||
+ | 'set names utf8', | ||
+ | ], | ||
], | ], | ||
], | ], | ||
行 101: | 行 108: | ||
* username --- データベースのユーザ名 | * username --- データベースのユーザ名 | ||
* password --- ユーザのパスワード | * password --- ユーザのパスワード | ||
+ | * driver_options --- データベースドライバー毎のオプション | ||
* check_tables --- アプリケーションで使用するテーブルの存在を確認するSQL文 | * check_tables --- アプリケーションで使用するテーブルの存在を確認するSQL文 | ||
+ | * initial_statements --- 接続直後に実行する初期化SQL文 | ||
- | '' | + | '' |
> 接続設定及び接続文字列の詳細は以下を参照して下さい:\\ https:// | > 接続設定及び接続文字列の詳細は以下を参照して下さい:\\ https:// | ||
'' | '' | ||
+ | |||
+ | '' | ||
=== initial_data === | === initial_data === | ||
行 282: | 行 293: | ||
* SQLの文法及び使用できる関数などは使用しているデーターベース( 上例では SQLite )に依存します。 | * SQLの文法及び使用できる関数などは使用しているデーターベース( 上例では SQLite )に依存します。 | ||
- | * コメントは行コメント( ''< | + | * 行コメント( ''< |
- | * 文はセミコロン( '';'' | + | * 文はセミコロン( '';'' |
* 連続する空白( '' | * 連続する空白( '' | ||
\\ | \\ | ||