Class Ethna_DB_PEAR

Description

Ethna_DBクラスの実装(PEAR版)

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

Ethna_DB
   |
   --Ethna_DB_PEAR
Method Summary
 Ethna_DB_PEAR Ethna_DB_PEAR (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 ()
Methods
Constructor Ethna_DB_PEAR (line 66)

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

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

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

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

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

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

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

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

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

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

DBに接続する

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

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

DB接続を切断する

  • access: public
void disconnect ()

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

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

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

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

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

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

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

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

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

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

DBタイプを返す

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

DB接続状態を返す

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

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

テーブルをロックする

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

クエリを発行する

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

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

  • access: protected
void quoteIdentifier (mixed $identifier)
  • mixed $identifier: array or string
rollback (line 167)

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

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

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

SQL文を取得する

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

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

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

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

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

Inherited Methods

Inherited From Ethna_DB

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

Documentation generated on Fri, 11 Nov 2011 03:59:40 +0900 by phpDocumentor 1.4.3