Class Ethna_DB_PEAR

Description

Ethna用DB抽象クラス

EthnaのフレームワークでDBオブジェクトを扱うための抽象クラス (のつもり...あぁすばらしきPHP 4)

Located in /class/DB/PEAR.php (line 21)

Ethna_DB
   |
   --Ethna_DB_PEAR
Variable Summary
 mixed $db
 mixed $dsn
 mixed $dsninfo
 mixed $logger
 mixed $persistent
 mixed $sql
 mixed $transaction
 mixed $type
Method Summary
 Ethna_DB_PEAR __construct (object Ethna_Controller $controller, string $dsn, bool $persistent)
 int affectedRows ()
 mixed begin ()
 mixed commit ()
 mixed connect ()
 void disconnect ()
 int fetchRow ( $res, [ $fetchmode = DB_FETCHMODE_DEFAULT], [ $rownum = null])
 mixed getInsertId ()
 mixed getMetaData (string $table)
 mixed getNextId ( $table_name,  $field_name)
 string getType ()
 bool isValid ()
 mixed lock (mixed $tables)
 mixed query (string $query)
 void quoteIdentifier (mixed $identifier)
 mixed rollback ()
 string sql (string $sqlid)
 mixed sqlquery (string $sqlid)
 mixed unlock ()
Variables
mixed $db (line 32)
  • access: public

Redefinition of:
Ethna_DB::$db
mixed $dsn (line 48)
  • access: protected
mixed $dsninfo (line 51)
  • access: protected
mixed $logger (line 39)
  • access: protected
mixed $persistent (line 54)
  • access: protected
mixed $sql (line 42)
  • access: protected
mixed $transaction = array() (line 35)
  • access: protected

Redefinition of:
Ethna_DB::$transaction
mixed $type (line 45)
  • access: protected
Methods
Constructor __construct (line 69)

Ethna_DB_PEARクラスのコンストラクタ

  • access: public
Ethna_DB_PEAR __construct (object Ethna_Controller $controller, string $dsn, bool $persistent)
  • object Ethna_Controller $controller: コントローラオブジェクト
  • string $dsn: DSN
  • bool $persistent: 持続接続設定

Redefinition of:
Ethna_DB::__construct()
Ethna_DBクラスのコンストラクタ
affectedRows (line 396)

直近のクエリによる更新行数を取得する

  • return: 更新行数
  • access: public
int affectedRows ()
begin (line 146)

DBトランザクションを開始する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed begin ()

Redefinition of:
Ethna_DB::begin()
DBトランザクションを開始する
commit (line 194)

DBトランザクションを終了する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed commit ()

Redefinition of:
Ethna_DB::commit()
DBトランザクションを終了する
connect (line 90)

DBに接続する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed connect ()

Redefinition of:
Ethna_DB::connect()
DBに接続する
disconnect (line 112)

DB接続を切断する

  • access: public
void disconnect ()

Redefinition of:
Ethna_DB::disconnect()
DB接続を切断する
fetchRow (line 364)

DB_Result::fetchRow()の結果を整形して返す

  • return: 更新行数
  • access: public
int fetchRow ( $res, [ $fetchmode = DB_FETCHMODE_DEFAULT], [ $rownum = null])
  • $res
  • $fetchmode
  • $rownum
getInsertId (line 343)

直前のINSERTによるIDを取得する (mysql, sqliteのみ対応)

  • return: int:直近のINSERTにより生成されたID null:未サポート
  • access: public
mixed getInsertId ()
getMetaData (line 221)

テーブル定義情報を取得する

  • return: array: PEAR::DBに準じたメタデータ Ethna_Error::エラー
  • access: public
mixed getMetaData (string $table)
  • string $table: テーブル名

Redefinition of:
Ethna_DB::getMetaData()
テーブル定義情報を取得する
getNextId (line 321)

直後のINSERTに使うIDを取得する (pgsqlのみ対応)

  • return: int
  • access: public
mixed getNextId ( $table_name,  $field_name)
  • $table_name
  • $field_name
getType (line 293)

DBタイプを返す

  • return: DBタイプ
  • access: public
string getType ()
isValid (line 128)

DB接続状態を返す

  • return: true:正常 false:エラー
  • access: public
bool isValid ()

Redefinition of:
Ethna_DB::isValid()
DB接続状態を返す
lock (line 479)

テーブルをロックする

  • return: DB_Result:結果オブジェクト Ethna_Error:エラー
  • access: public
mixed lock (mixed $tables)
  • mixed $tables: ロック対象テーブル名
query (line 307)

クエリを発行する

  • return: DB_Result:結果オブジェクト Ethna_Error:エラー
  • access: public
mixed query (string $query)
  • string $query: SQL文
quoteIdentifier (line 410)

dbのtypeに応じて識別子をquoteする (配列の場合は各要素をquote)

  • access: public
void quoteIdentifier (mixed $identifier)
  • mixed $identifier: array or string
rollback (line 170)

DBトランザクションを中断する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed rollback ()

Redefinition of:
Ethna_DB::rollback()
DBトランザクションを中断する
sql (line 461)

SQL文を取得する

  • return: SQL文
  • access: public
string sql (string $sqlid)
  • string $sqlid: SQL-ID
sqlquery (line 443)

SQL文指定クエリを発行する

  • return: DB_Result:結果オブジェクト Ethna_Error:エラー
  • access: public
mixed sqlquery (string $sqlid)
  • string $sqlid: SQL-ID(+引数)
unlock (line 502)

テーブルのロックを解放する

  • return: DB_Result:結果オブジェクト Ethna_Error:エラー
  • access: public
mixed unlock ()

Inherited Methods

Inherited From Ethna_DB

 Ethna_DB::__construct()
 Ethna_DB::begin()
 Ethna_DB::commit()
 Ethna_DB::connect()
 Ethna_DB::disconnect()
 Ethna_DB::getDSN()
 Ethna_DB::getMetaData()
 Ethna_DB::isValid()
 Ethna_DB::parseDSN()
 Ethna_DB::rollback()

Documentation generated on Fri, 11 Nov 2011 03:58:47 +0900 by phpDocumentor 1.4.3