BEAR_Mdb2
[ class tree: BEAR_Mdb2 ] [ index: BEAR_Mdb2 ] [ all elements ]

Class: BEAR_Mdb2

Source Location: /BEAR/Mdb2.php

Class Overview

BEAR_Base
   |
   --BEAR_Factory
      |
      --BEAR_Mdb2

MDB2


Author(s):

Version:

  • SVN: Release: @package_version@ $Id: Mdb2.php 2486 2011-06-06 07:44:05Z koriyama@bear-project.net $

Copyright:

  • 2008-2011 Akihito Koriyama All rights reserved.

Methods


Inherited Variables

Inherited Methods


Class Details

[line 127]
MDB2

MDB2 PEAR::MDB2を生成、設定してインスタンスを返すMDB2のファクトリークラスです。

 MDB2結果コード

 ('MDB2_OK',                      true);
 ('MDB2_ERROR',                     -1);
 ('MDB2_ERROR_SYNTAX',              -2);
 ('MDB2_ERROR_CONSTRAINT',          -3);
 ('MDB2_ERROR_NOT_FOUND',           -4);
 ('MDB2_ERROR_ALREADY_EXISTS',      -5);
 ('MDB2_ERROR_UNSUPPORTED',         -6);
 ('MDB2_ERROR_MISMATCH',            -7);
 ('MDB2_ERROR_INVALID',             -8);
 ('MDB2_ERROR_NOT_CAPABLE',         -9);
 ('MDB2_ERROR_TRUNCATED',          -10);
 ('MDB2_ERROR_INVALID_NUMBER',     -11);
 ('MDB2_ERROR_INVALID_DATE',       -12);
 ('MDB2_ERROR_DIVZERO',            -13);
 ('MDB2_ERROR_NODBSELECTED',       -14);
 ('MDB2_ERROR_CANNOT_CREATE',      -15);
 ('MDB2_ERROR_CANNOT_DELETE',      -16);
 ('MDB2_ERROR_CANNOT_DROP',        -17);
 ('MDB2_ERROR_NOSUCHTABLE',        -18);
 ('MDB2_ERROR_NOSUCHFIELD',        -19);
 ('MDB2_ERROR_NEED_MORE_DATA',     -20);
 ('MDB2_ERROR_NOT_LOCKED',         -21);
 ('MDB2_ERROR_VALUE_COUNT_ON_ROW', -22);
 ('MDB2_ERROR_INVALID_DSN',        -23);
 ('MDB2_ERROR_CONNECT_FAILED',     -24);
 ('MDB2_ERROR_EXTENSION_NOT_FOUND',-25);
 ('MDB2_ERROR_NOSUCHDB',           -26);
 ('MDB2_ERROR_ACCESS_VIOLATION',   -27);
 ('MDB2_ERROR_CANNOT_REPLACE',     -28);
 ('MDB2_ERROR_CONSTRAINT_NOT_NULL',-29);
 ('MDB2_ERROR_DEADLOCK',           -30);
 ('MDB2_ERROR_CANNOT_ALTER',       -31);
 ('MDB2_ERROR_MANAGER',            -32);
 ('MDB2_ERROR_MANAGER_PARSE',      -33);
 ('MDB2_ERROR_LOADMODULE',         -34);
 ('MDB2_ERROR_INSUFFICIENT_DATA',  -35);

 DATAタイプ

 'text':
 'clob':
 'blob':
 'integer':
 'boolean':
 'date':
 'time':
 'timestamp':
 'float':
 'decimal':

 MDB2オプション
  • $options['ssl'] -> boolean: determines if ssl should be used for connections
  • $options['field_case'] -> CASE_LOWER|CASE_UPPER: determines what case to force on field/table names
  • $options['disable_query'] -> boolean: determines if queries should be executed
  • $options['result_class'] -> string: class used for result sets
  • $options['buffered_result_class'] -> string: class used for buffered result sets
  • $options['result_wrap_class'] -> string: class used to wrap result sets into
  • $options['result_buffering'] -> boolean should results be buffered or not?
  • $options['fetch_class'] -> string: class to use when fetch mode object is used
  • $options['persistent'] -> boolean: persistent connection?
  • $options['debug'] -> integer: numeric debug level
  • $options['debug_handler'] -> string: function/method that captures debug messages
  • $options['debug_expanded_output'] -> bool: BC option to determine if more context information should be send to the debug handler
  • $options['default_text_field_length'] -> integer: default text field length to use
  • $options['lob_buffer_length'] -> integer: LOB buffer length
  • $options['log_line_break'] -> string: line-break format
  • $options['idxname_format'] -> string: pattern for index name
  • $options['seqname_format'] -> string: pattern for sequence name
  • $options['savepoint_format'] -> string: pattern for auto generated savepoint names
  • $options['statement_format'] -> string: pattern for prepared statement names
  • $options['seqcol_name'] -> string: sequence column name
  • $options['quote_identifier'] -> boolean: if identifier quoting should be done when check_option is used
  • $options['use_transactions'] -> boolean: if transaction use should be enabled
  • $options['decimal_places'] -> integer: number of decimal places to handle
  • $options['portability'] -> integer: portability constant
  • $options['modules'] -> array: short to long module name mapping for __call()
  • $options['emulate_prepared'] -> boolean: force prepared statements to be emulated
  • $options['datatype_map'] -> array: map user defined datatypes to other primitive datatypes
  • $options['datatype_map_callback'] -> array: callback function/method that should be called
  • $options['bindname_format'] -> string: regular expression pattern for named parameters
  • $options['multi_query'] -> boolean: determines if queries returning multiple result sets should be executed
  • $options['max_identifiers_length'] -> integer: max identifier length
  • $options['default_fk_action_onupdate'] -> string: default FOREIGN KEY ON UPDATE action ['RESTRICT'|'NO ACTION'|'SET DEFAULT'|'SET NULL'|'CASCADE']
  • $options['default_fk_action_ondelete'] -> string: default FOREIGN KEY ON DELETE action ['RESTRICT'|'NO ACTION'|'SET DEFAULT'|'SET NULL'|'CASCADE']




Tags:

author:  Akihito Koriyama <koriyama@bear-project.net>
version:  SVN: Release: @package_version@ $Id: Mdb2.php 2486 2011-06-06 07:44:05Z koriyama@bear-project.net $
copyright:  2008-2011 Akihito Koriyama All rights reserved.
link:  http://www.bear-project.net/
license:  BSD


[ Top ]


Class Methods


static method onDebug [line 203]

static void onDebug( object &$db, string $scope, string $message, [unknown_type $isManip = null])

デバック用ハンドラ

デバック用ハンドラ




Tags:

access:  public


Parameters:

object   &$db   MDB2オブジェクト
string   $scope   スコープ
string   $message   メッセージ
unknown_type   $isManip   不明

[ Top ]

constructor __construct [line 137]

BEAR_Mdb2 __construct( $config)

Constructor

Constructor




Tags:

access:  public


Overrides BEAR_Base::__construct() (Universal constructor)

Parameters:

array   $config  

[ Top ]

method factory [line 151]

MDB2_Driver_Datatype_mysqli factory( )

ファクトリー

ファクトリー MDB2を生成して設定(エラーハンドラーの設定やフェッチモードをASSOC)しています。 $dsnを省略すればApp_DB::$config['db']['default']がDSNとして利用されます。




Tags:

throws:  BEAR_Mdb2_Exception
access:  public


Overrides BEAR_Factory::factory() (Factory)

[ Top ]


Documentation generated on Sat, 30 Jul 2011 00:11:31 +0900 by phpDocumentor 1.4.3