| experimental | |
|---|---|
| package |
jelix |
__construct(array $profile)
arrayprofile properties
__destruct()
_autoCommitNotify(boolean $state)
booleanthe new state of autocommit
_connect() : integer
integerconnection identifier
_disconnect()
_doExec( $queryString) : \jDbResultSet/boolean
\jDbResultSet/boolean
_doLimitQuery( $queryString, $offset, $number) : \jDbResultSet/boolean
\jDbResultSet/boolean
_doQuery( $queryString) : \jDbResultSet/boolean
\jDbResultSet/boolean
_quote(string $text, boolean $binary) : string
you should override it into the driver
stringthe text to escape
booleantrue if the content of the string is a binary content
stringthe escaped string
_replaceParam( $matches)
beginTransaction()
commit()
disconnect()
encloseName(string $fieldName) : string
| since | 1.1.1 |
|---|
stringthe field name
stringthe enclosed field name
errorCode() : integer
integerthe last error code
errorInfo() : string
stringthe last error description
exec(string $query) : integer
.) which doesn't return rows
stringthe SQL query
integerthe number of affected rows. False if the query has failed.
findParameters(string $sql, string $marker) : array
string
stringa string which will replace each named parameter in the query. it may end by a '%' so named parameters are replaced by numerical parameter. ex : '$%' : named parameters will be replaced by $1, $2, $3...
array0:the new sql, 1: list of parameters names, in the order they appear into the query
getAttribute(integer $id) : string
| see | \PDO::getAttribute() |
|---|
integerthe attribut id
stringthe attribute value
hasTablePrefix() : boolean
| author |
Julien Issler |
|---|---|
| since | 1.0 |
boolean
lastIdInTable(string $fieldName, string $tableName) : integer
stringthe name of the primary key
stringthe name of the table
integerthe maximum value
lastInsertId(string $fromSequence = '') : integer
Some driver need a sequence name, so give it at first parameter
stringthe sequence name
integerthe id value
limitQuery(string $queryString, integer $limitOffset, integer $limitCount) : \jDbResultSet|boolean
stringthe SQL query
integerthe offset of the first row to return
integerthe maximum of number of rows to return
\jDbResultSet|booleanSQL Select. False if the query has failed.
prefixTable( $table_name) : string
| author |
Julien Issler |
|---|---|
| since | 1.0 |
stringthe prefixed table's name
prepare(string $query) : \statement
stringa sql query with parameters
\statementa statement
query(string $queryString, integer $fetchmode = self::FETCH_OBJ, $arg1 = null, array $ctoargs = null) : \jDbResultSet|boolean
stringthe SQL query
integerFETCH_OBJ, FETCH_CLASS or FETCH_INTO
arrayarguments for the constructor if FETCH_CLASS
\jDbResultSet|booleanFalse if the query has failed.
quote(string $text, integer $parameter_type) : string
stringstring to quote
integerunused, just for compatibility with PDO
stringescaped string
quote2(string $text, boolean $checknull = true, boolean $binary = false) : string
| since | 1.2 |
|---|
stringstring to quote
booleanif true, check if $text is a null value, and then return NULL
booleanset to true if $text contains a binary string
stringescaped string
rollback()
setAttribute(integer $id, string $value)
| see | \PDO::setAttribute() |
|---|---|
integerthe attribut id
stringthe attribute value
setAutoCommit(boolean $state = true)
booleanthe status of autocommit
unprefixTable(string $tableName) : string
| since | 1.6.16 |
|---|
string
stringthe table name unprefixed
FETCH_OBJ
FETCH_CLASS
FETCH_INTO
ATTR_AUTOCOMMIT
ATTR_PREFETCH
ATTR_TIMEOUT
ATTR_ERRMODE
ATTR_SERVER_VERSION
ATTR_SERVER_INFO
ATTR_CLIENT_VERSION
ATTR_CONNECTION_STATUS
ATTR_CASE
ATTR_CURSOR
ATTR_ORACLE_NULLS
ATTR_PERSISTENT
ATTR_DRIVER_NAME
CURSOR_FWDONLY
CURSOR_SCROLL
profile : array
| var |
|---|
array
dbms : string
..) It is not the driver name. Several drivers could connect to the same database type. This type name is often used to know whish SQL language we should use.
| var |
|---|
string
driverName : string
| var |
|---|
string
msgError : string
| var |
|---|
string
lastQuery :
_autocommit : boolean
| var |
|---|
boolean
_connection : mixed
| var |
|---|
mixed
_debugMode :