Class Ethna_DB_ADOdb

Description

Ethna_DB_ADOdb

EthnaのフレームワークでADOdbオブジェクトを扱うための抽象クラス

Located in /class/DB/Ethna_DB_ADOdb.php (line 34)

Ethna_DB
   |
   --Ethna_DB_ADOdb
Method Summary
 Ethna_DB_ADOdb Ethna_DB_ADOdb (object Ethna_Controller &$controller, string $dsn, bool $persistent)
 void autoExecute ( $table,  $fields,  $mode, [ $where = false], [ $forceUpdate = true], [ $magicq = false])
 mixed begin ()
 mixed commit ()
 mixed connect ()
 void disconnect ()
 void execute ( $query, [ $inputarr = false])
 void getAll ( $query, [ $inputarr = false])
 void getCol ( $query, [ $inputarr = false])
 void getOne ( $query, [ $inputarr = false])
 void getRow ( $query, [ $inputarr = false])
 bool isValid ()
 void pageExecute (string $query, string $nrows, integer $page, [array $inputarr = false])
 array parseDSN (string $dsn)
 mixed &query (string $query, [ $inputarr = false])
 void replace ( $table,  $arrFields,  $keyCols, [ $autoQuote = false])
 mixed rollback ()
Methods
Constructor Ethna_DB_ADOdb (line 57)

コンストラクタ

  • access: public
Ethna_DB_ADOdb Ethna_DB_ADOdb (object Ethna_Controller &$controller, string $dsn, bool $persistent)
  • object Ethna_Controller &$controller: コントローラオブジェクト
  • string $dsn: DSN
  • bool $persistent: 持続接続設定
autoExecute (line 255)
void autoExecute ( $table,  $fields,  $mode, [ $where = false], [ $forceUpdate = true], [ $magicq = false])
  • $table
  • $fields
  • $mode
  • $where
  • $forceUpdate
  • $magicq
begin (line 129)

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

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

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

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

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

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

DBに接続する

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

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

DB接続を切断する

  • access: public
void disconnect ()

Redefinition of:
Ethna_DB::disconnect()
DB接続を切断する
execute (line 241)
void execute ( $query, [ $inputarr = false])
  • $query
  • $inputarr
getAll (line 212)

getAll

  • access: public
void getAll ( $query, [ $inputarr = false])
  • $query
  • $inputarr
getCol (line 234)
void getCol ( $query, [ $inputarr = false])
  • $query
  • $inputarr
getOne (line 220)
void getOne ( $query, [ $inputarr = false])
  • $query
  • $inputarr
getRow (line 227)
void getRow ( $query, [ $inputarr = false])
  • $query
  • $inputarr
isValid (line 112)

DB接続状態を返す

  • return: true:正常(接続済み) false:エラー/未接続
  • access: public
bool isValid ()

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

pageExecute

void pageExecute (string $query, string $nrows, integer $page, [array $inputarr = false])
  • string $query
  • string $nrows
  • integer $page
  • array $inputarr
parseDSN (line 312)

Parse a data source name

Additional keys can be added by appending a URI query string to the end of the DSN.

The format of the supplied DSN is in its fullest form:

  1.   phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true

Most variations are allowed:

  1.   phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644
  2.   phptype://username:password@hostspec/database_name
  3.   phptype://username:password@hostspec
  4.   phptype://username@hostspec
  5.   phptype://hostspec/database
  6.   phptype://hostspec
  7.   phptype(dbsyntax)
  8.   phptype

  • return: an associative array with the following keys:
    • phptype: Database backend used in PHP (mysql, odbc etc.)
    • dbsyntax: Database used with regards to SQL syntax etc.
    • protocol: Communication protocol to use (tcp, unix etc.)
    • hostspec: Host specification (hostname[:port])
    • database: Database to use on the DBMS server
    • username: User name for login
    • password: Password for login
array parseDSN (string $dsn)
  • string $dsn: Data Source Name to be parsed
query (line 171)

クエリを発行する

  • return: DB_Result:結果オブジェクト Ethna_Error:エラー
  • access: public
mixed &query (string $query, [ $inputarr = false])
  • string $query: SQL文
  • $inputarr
replace (line 248)
void replace ( $table,  $arrFields,  $keyCols, [ $autoQuote = false])
  • $table
  • $arrFields
  • $keyCols
  • $autoQuote
rollback (line 142)

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

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

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

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:38 +0900 by phpDocumentor 1.4.3