Pgsql
- Full name:
\Qubus\Expressive\Connection\Pdo\Pgsql
- Parent class:
\Qubus\Expressive\Connection\PdoConnection
Properties
driverName
Methods
buildDsn
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$config | array |
listTables
Get an array of table names from the connection.
Return Value:
tables names.
listDatabases
Get an array of database names from the connection.
Return Value:
database names.
listFields
Get an array of table fields from a table.
Parameters:
Parameter | Type | Description |
---|---|---|
$table | mixed |
Return Value:
field arrays
Inherited methods
quoteIdentifier
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string |
quote
Quote a value for an SQL query.
Objects passed to this function will be converted to strings. Expression objects will use the value of the expression. Query objects will be compiled and converted to a sub-query. Fnc objects will be sent of for compiling. All other objects will be converted using the __toString
method.
Parameters:
Parameter | Type | Description |
---|---|---|
$value | float|array|bool|int|string|null | any value to quote |
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$config | array |
createPdo
Parameters:
Parameter | Type | Description |
---|---|---|
$config | array |
getDsn
Returns the DSN associated with this connection
query
Execute a query
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string | SQL Query. |
$params | array | (optional) Query params. |
command
Execute a non-query SQL command.
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string | SQL Command. |
$params | array | (optional) Command params. |
affectedRows
Execute a query and return the number of affected rows.
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string | SQL Query. |
$params | array | (optional) Query params. |
column
Execute a query and fetch the first column
Parameters:
Parameter | Type | Description |
---|---|---|
$sql | string | SQL Query |
$params | array | (optional) Query params |
queryBuilder
getDriver
Returns the driver's name.
getSchema
Returns the schema associated with this connection
schemaCompiler
Returns an instance of the schema compiler associated with this connection
Throws:
inTransaction
startTransaction
Start a transaction.
commitTransaction
rollbackTransaction
transaction
Run transactional queries.
Parameters:
Parameter | Type | Description |
---|---|---|
$callback | \Closure | transaction callback |
$that | mixed | |
$default | mixed |
Throws:
setCharset
Sets the connection encoding.
Parameters:
Parameter | Type | Description |
---|---|---|
$charset | string | Encoding. |
replaceParams
Replace placeholders with parameters.
Parameters:
Parameter | Type | Description |
---|---|---|
$query | string | SQL query |
$params | array | Query parameters |
prepare
Prepares a query.
Parameters:
Parameter | Type | Description |
---|---|---|
$query | string | SQL query |
$params | array | Query parameters |
bindValues
Parameters:
Parameter | Type | Description |
---|---|---|
$statement | \PDOStatement | |
$values | array |
pdoExecute
Executes a prepared query and returns true on success or false on failure.
Parameters:
Parameter | Type | Description |
---|---|---|
$prepared | array | Prepared query |
supportsReturning
supportsUpsert
supportsSavepoints
buildDsn
- This method is static.
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$config | array |
Automatically generated on 2025-10-13