Public Member Functions | |
KjwFakeSql ($sqltype, $unused_host, $unused_port, $unused_user, $unused_pass, $lockpath=null) | |
Construct a KjwFakeSql object. | |
destroy () | |
Destructor performing cleanup. | |
connect () | |
Connect to the SQL server. | |
disconnect () | |
Disconnect from the SQL server. | |
_acquireLock ($type= 'RW', $retryCount=3, $waitMs=64) | |
_releaseLock () | |
execute ($query) | |
Execute a query. | |
nameQuote ($name) | |
Quote a name for an object (column or table). | |
_nameUnquote ($quoted) | |
[PRIVATE] Undo what nameQuote does. | |
safeQuote ($mixed) | |
Makes sure that any variable is quoted like its correct type should be. | |
_safeUnquote ($quoted) | |
_splitColumns ($string) | |
_splitValues ($string) | |
Public Attributes | |
$_lockName = null | |
$_lockHandle = null | |
$_locked = null |
It's supposed to be a temporary solution for tiny database needs.
Definition at line 15 of file KjwFakeSql.php.
KjwFakeSql::connect | ( | ) |
Connect to the SQL server.
Reimplemented from KjwSql.
Definition at line 42 of file KjwFakeSql.php.
References $kjw_suppressed_error, and KjwObject::croak().
KjwFakeSql::destroy | ( | ) |
Destructor performing cleanup.
Don't rely on this being called ever. The user must call it by hand.
Reimplemented from KjwSql.
Definition at line 36 of file KjwFakeSql.php.
References disconnect().
KjwFakeSql::disconnect | ( | ) |
Disconnect from the SQL server.
Reimplemented from KjwSql.
Definition at line 54 of file KjwFakeSql.php.
Referenced by destroy().
KjwFakeSql::execute | ( | $ | query | ) |
Execute a query.
$query | The query to execute. |
Reimplemented from KjwSql.
Definition at line 90 of file KjwFakeSql.php.
References _nameUnquote(), and KjwObject::croak().
KjwFakeSql::KjwFakeSql | ( | $ | sqltype, | |
$ | unused_host, | |||
$ | unused_port, | |||
$ | unused_user, | |||
$ | unused_pass, | |||
$ | lockpath = null | |||
) |
Construct a KjwFakeSql object.
$sqltype | SQL type name (e.g. 'xmlsql'). | |
$unused_host | Server name (possibly unused). | |
$unused_port | Port number (possibly unused). | |
$unused_user | User name (possibly unused). | |
$unused_pass | Password (possibly unused). | |
$lockpath | Lockfile name. Optional if you do your own locking. (Override _acquireLock/_releaseLock.) |
Definition at line 30 of file KjwFakeSql.php.
References KjwSql::KjwSql().
Referenced by KjwXmlSql::KjwXmlSql().
KjwFakeSql::nameQuote | ( | $ | string | ) |
Quote a name for an object (column or table).
For MySQL this would be by surrounding the name with backticks.
$string | An identifier (column or table name) to be quoted. |
Reimplemented from KjwSql.
Definition at line 150 of file KjwFakeSql.php.
KjwFakeSql::safeQuote | ( | $ | mixed | ) |
Makes sure that any variable is quoted like its correct type should be.
Integers and booleans are returned as integers. Strings are returned as quoted strings with all quotes escaped. If the escaping mechanism is not known, all <32 and >127 characters REMOVED, otherwise the escaping for the specific database make is used.
$mixed | The variable that needs to be returned as a safe entity. |
Reimplemented from KjwSql.
Definition at line 163 of file KjwFakeSql.php.