Pgsql
Pgsql
Properties
dsnElements
public array $dsnElements
Methods
__construct
Constructor for the Pgsql class.
public __construct({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$adapter | Adapter | |
$config | Map | the configuration settings for the Pgsql class |
schemaExists
Checks if a schema exists in the database.
public schemaExists({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$schemaName | string | the name of the schema to check |
createSchema
Creates a new database schema if it does not already exist.
public createSchema({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$schemaName | string | the name of the schema to create |
setTimezone
Sets the timezone for the database connection.
public setTimezone({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$tz | string | the timezone to set |
repair
Run a DBD repair process for this database type.
public repair({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$table | string |
fixValue
Fixes the value before it is used in a database query.
public fixValue({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$value | mixed | the value to be fixed |
field
Converts the given value to a string representation suitable for use in a database query.
public field({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$string | mixed | the value to be converted |
listTables
Retrieves a list of tables in the database.
public listTables({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$schema | string | the name of the schema to retrieve the tables from. default is current schema |
$ | false |
listConstraints
Retrieves a list of constraints for a given table or all tables in the schema.
public listConstraints({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$table | NULL | The name of the table. If null, constraints for all tables in the schema will be retrieved. |
$type | NULL | The type of constraints to retrieve. If null, all types of constraints will be retrieved. |
$invertType | boolean | Whether to invert the constraint type filter. If true, constraints of types other than the specified type will be retrieved. |
$ | false |
listIndexes
Retrieves a list of indexes for a given table or all tables in the specified schema.
public listIndexes({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$table | string | The name of the table. If null, all tables in the schema will be considered. |
$ | false |
listViews
Retrieves a list of views from the database.
public listViews({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$ | false |
describeView
Retrieves the description of a database view.
public describeView({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | the name of the view |
$ | false |
prepareCriteriaAction
Prepares the criteria action for the database query.
public prepareCriteriaAction({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$action | string | the action to perform on the criteria |
$value | mixed | the value to use in the criteria |
$tissue | string | the comparison operator for the criteria |
$key | NULL | the key to use in the criteria |
$setKey | boolean | whether to set the key in the criteria |
listUsers
Retrieves a list of users from the PostgreSQL database.
public listUsers({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$ | false |
listGroups
Retrieves a list of groups from the PostgreSQL database.
public listGroups({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$ | false |
createRole
Creates a new database role with the given name, password, and privileges.
public createRole({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | the name of the role to create |
$password | string | the password for the role (optional) |
$privileges | array | an array of privileges to assign to the role (optional) |
listExtensions
Retrieves a list of extensions in the specified schema.
public listExtensions({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$ | false |
createExtension
Creates a PostgreSQL extension.
public createExtension({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | the name of the extension to create |
dropExtension
Drops a PostgreSQL extension from the database.
public dropExtension({Array})
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | the name of the extension to drop |
$ifExists | boolean | (optional) Whether to drop the extension only if it exists. Default is false. |
Generated by Hazaar API Doc Generator