Description
AkObject
|
--AkDbAdapter
Located in File: /AkActiveRecord/AkDbAdapter.php
Allows for __construct and __destruct to be used in PHP4.
A hack to support __construct() on PHP 4 Hint: descendant classes have no PHP4 class_name() constructors, so this one gets called first and calls the top-layer __construct() which (if present) should call parent::__construct()
Classes extended from AkDbAdapter:
- AkSqliteDbAdapter
- AkPgsqlDbAdapter
- AkMysqlDbAdapter
Method Detail
Summary:
static
AkDbAdapter
&getInstance
([
$database_specifications =
AK_DEFAULT_DATABASE_PROFILE], [
$auto_connect =
true],
array $database_settings)
AkDbAdapter
__construct
(
array $database_settings, [
$auto_connect =
false])
void
debug
([
$on =
'switch'])
void
delete
(
$sql, [
$message =
''])
void
execute
(
$sql, [
$message =
'SQL'])
void
insert
(
$sql, [
$id =
null], [
$pk =
null], [
$table =
null], [
$message =
''])
void
select
(
$sql, [
$message =
''])
void
update
(
$sql, [
$message =
''])
string
_hash
(
array $settings)
Static Method getInstance (line 87)
AkDbAdapter &getInstance(
[
$database_specifications = AK_DEFAULT_DATABASE_PROFILE], [
$auto_connect = true], array
$database_settings)
Parameters
- array $database_settings:
- $database_specifications:
- $auto_connect:
Info
Constructor __construct (line 37)
AkDbAdapter __construct(
array
$database_settings, [
$auto_connect = false])
Overrides : AkObject::__construct() Class constructor, overriden in descendant classes
Parameters
- array $database_settings:
- $auto_connect:
Info
Destructor __destruct (line 48)
void __destruct(
)
Overrides : AkObject::__destruct() Class destructor, overriden in descendant classes
Info
Method connect (line 52)
void connect(
)
Info
Method connected (line 76)
void connected(
)
Info
Method debug (line 182)
void debug(
[
$on = 'switch'])
Parameters
Info
Method delete (line 261)
void delete(
$sql, [
$message = ''])
Parameters
Info
Method escape_blob (line 392)
void escape_blob(
$value)
Parameters
Info
Method execute (line 213)
void execute(
$sql, [
$message = 'SQL'])
Parameters
Info
Method failTransaction (line 340)
void failTransaction(
)
Info
Method getAffectedRows (line 241)
void getAffectedRows(
)
Info
Method getColumnDetails (line 364)
void getColumnDetails(
$table_name)
Parameters
Info
Method getDictionary (line 137)
void &getDictionary(
)
Info
Method getIndexes (line 369)
void getIndexes(
$table_name)
Parameters
Info
Method getLastInsertedId (line 236)
void getLastInsertedId(
$table,
$pk)
Parameters
Info
Method hasTransactionFailed (line 345)
void hasTransactionFailed(
)
Info
Method insert (line 246)
void insert(
$sql, [
$id = null], [
$pk = null], [
$table = null], [
$message = ''])
Parameters
- $sql:
- $id:
- $pk:
- $table:
- $message:
Info
Method quote_date (line 386)
void quote_date(
$value)
Parameters
Info
Method quote_datetime (line 381)
void quote_datetime(
$value)
Parameters
Info
Method select (line 313)
void select(
$sql, [
$message = ''])
Returns an array of record hashes with the column names as keys and column values as values.
Parameters
Info
Method selectAll (line 304)
void selectAll(
$sql)
alias for select
Parameters
Info
Method selectOne (line 295)
void selectOne(
$sql)
Returns a record array of the first row with the column names as keys and column values as values.
Parameters
Info
Method selectValue (line 270)
void selectValue(
$sql)
Returns a single value, the first column from the first row, from a record
Parameters
Info
Method selectValues (line 280)
void selectValues(
$sql)
Returns an array of the values of the first column in a select:
sqlSelectValues("SELECT id FROM companies LIMIT 3") => array(1,2,3)
Parameters
Info
Method startTransaction (line 330)
void startTransaction(
)
Info
Method stopTransaction (line 335)
void stopTransaction(
)
Info
Method unescape_blob (line 398)
void unescape_blob(
$value)
Parameters
Info
Method update (line 255)
void update(
$sql, [
$message = ''])
Parameters
Info
Method _getDbSettingsFromDsn (line 168)
void _getDbSettingsFromDsn(
$dsn)
Parameters
Info
Method _hash (line 126)
string _hash(
array
$settings)
Parameters
Info
Method _log (line 192)
void _log(
$message)
Parameters
Info