Class DbIbase

Description

Firebird数据库驱动类 剑雷 2007.12.28

Located in /Think/Db/Driver/DbIbase.class.php (line 24)

Base
   |
   --Db
      |
      --DbIbase
Method Summary
DbIbase __construct ([array $config = ''])
二进制数据 BlobDecode ($blob $blob)
void close ()
boolen commit ()
void connect ([ $config = ''], [ $linkNum = 0])
string error ()
string escape_string (string $str)
void free ()
array getAll ([ $sql = null], [string $resultType = null])
void getFields ( $tableName)
array getRow ([ $sql = null], [integer $seek = 0], string $str)
void getTables ([ $dbName = ''])
boolen next ()
boolen rollback ()
void startTrans ()
integer _execute ([string $str = ''])
resultSet _query ([string $str = ''])
Variables
Methods
Constructor __construct (line 35)

架构函数 读取数据库配置信息

  • access: public
DbIbase __construct ([array $config = ''])
  • array $config: 数据库配置数组

Redefinition of:
Db::__construct()
架构函数
BlobDecode (line 272)

BLOB字段解密函数 Firebird特有

  • throws: ThinkExecption
  • access: public
二进制数据 BlobDecode ($blob $blob)
  • $blob $blob: 待解密的BLOB
close (line 524)

关闭数据库

  • throws: ThinkExecption
  • access: public
void close ()
commit (line 193)

用于非自动提交状态下面的查询提交

  • throws: ThinkExecption
  • access: public
boolen commit ()
connect (line 55)

连接数据库方法

  • throws: ThinkExecption
  • access: public
void connect ([ $config = ''], [ $linkNum = 0])
  • $config
  • $linkNum
error (line 545)

数据库错误信息

并显示当前的SQL语句

  • throws: ThinkExecption
  • access: public
string error ()
escape_string (line 566)

SQL指令安全过滤

  • throws: ThinkExecption
  • access: public
string escape_string (string $str)
  • string $str: SQL字符串
free (line 91)

释放查询结果

  • access: public
void free ()
getAll (line 390)

获得所有的查询数据

查询结果放到 resultSet 数组中

  • throws: ThinkExecption
  • access: public
array getAll ([ $sql = null], [string $resultType = null])
  • string $resultType: 数据集类型
  • $sql
getFields (line 453)

取得数据表的字段信息

  • throws: ThinkExecption
  • access: public
void getFields ( $tableName)
  • $tableName
getRow (line 313)

获得一条查询结果

  • throws: ThinkExecption
  • access: public
array getRow ([ $sql = null], [integer $seek = 0], string $str)
  • integer $seek: 指针位置
  • string $str: SQL指令
  • $sql
getTables (line 504)

取得数据库的表信息

  • throws: ThinkExecption
  • access: public
void getTables ([ $dbName = ''])
  • $dbName
next (line 242)

获得下一条查询结果 简易数据集获取方法

查询结果放到 result 数组中

  • throws: ThinkExecption
  • access: public
boolen next ()
rollback (line 217)

事务回滚

  • throws: ThinkExecption
  • access: public
boolen rollback ()
startTrans (line 173)
  • access: public
void startTrans ()
_execute (line 147)

执行语句 针对 INSERT, UPDATE 以及DELETE

  • throws: ThinkExecption
  • access: protected
integer _execute ([string $str = ''])
  • string $str: sql指令
_query (line 110)

执行查询 主要针对 SELECT, SHOW 等指令

返回数据集

  • throws: ThinkExecption
  • access: protected
resultSet _query ([string $str = ''])
  • string $str: sql指令

Inherited Methods

Inherited From Db

Db::__construct()
Db::add()
Db::addAll()
Db::addConnect()
Db::addSpecialChar()
Db::autoExec()
Db::debug()
Db::execute()
Db::factory()
Db::fieldFormat()
Db::find()
Db::getDbType()
Db::getInstance()
Db::getLastSql()
Db::initConnect()
Db::isMainIps()
Db::lazyQuery()
Db::multiConnect()
Db::parseDSN()
Db::parseFields()
Db::parseGroup()
Db::parseHaving()
Db::parseJoin()
Db::parseLimit()
Db::parseOrder()
Db::parseSets()
Db::parseTables()
Db::parseValues()
Db::parseWhere()
Db::Q()
Db::query()
Db::remove()
Db::save()
Db::setDec()
Db::setField()
Db::setInc()
Db::setLockMode()
Db::switchConnect()
Db::W()

Documentation generated on Thu, 27 Mar 2008 08:20:33 +0000 by 塞北的雪