A connection object based on PDO, for debugging
| package |
jelix |
|---|---|
| subpackage |
db |
__construct(array $profile)
arraythe profile data readed from the ini file
_parseSqlitePath( $path)
encloseName(string $fieldName) : string
| since | 1.1.2 |
|---|
stringthe field name
stringthe enclosed field name
exec( $query)
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 = null) : string
so, we use a custom query
stringthe sequence name, if needed
string
limitQuery(string $queryString, integer $limitOffset = null, integer $limitCount = null) : \jDbPDOResultSet|boolean
stringthe SQL query
integerthe offset of the first row to return
integerthe maximum of number of rows to return
\jDbPDOResultSet|booleanSQL Select. False if the query has failed.
limitQuerySqlsrv(string $queryString, integer $limitOffset = null, integer $limitCount = null) : string
stringthe SQL query
integerthe offset of the first row to return
integerthe maximum of number of rows to return
stringSQL Select.
prefixTable( $table_name) : string
| author |
Julien Issler |
|---|---|
| since | 1.0 |
stringthe prefixed table's name
query()
quote2(string $text, boolean $checknull = true, boolean $binary = false) : string
| since | 1.2 |
|---|---|
| todo |
$binary parameter is not really supported, check if PDOConnection::quote supports binary strings |
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
setAutoCommit(boolean $state = true)
booleanthe status of autocommit
_mysqlCharsets :
_pgsqlCharsets :
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