Свойство | Type | Description | |
---|---|---|---|
$_maxNameLen | Max object name length | ||
$_schema | Store the current schema | ||
$codemap | encoding name is the same as its database encoding name. | ||
$defaultprops | |||
$extraTypes | Extra "magic" types. BIGSERIAL was added in PostgreSQL 7.2. | ||
$fkactions | Foreign key stuff. First element MUST be the default. | ||
$fkdeferrable | |||
$fkinitial | |||
$fkmatches | |||
$funcprops | Function properties | ||
$help_base | Default help URL | ||
$help_page | Help sub pages | ||
$id | Name of id column | ||
$joinOps | Supported join operations for use with view wizard | ||
$langmap | Map of internal language name to syntax highlighting name | ||
$major_version | |||
$predefined_size_types | Predefined size types | ||
$privlist | of objects. | ||
$privmap | refer to. | ||
$rule_events | Rule action types | ||
$selectOps | Select operators | ||
$triggerEvents | Array of allowed trigger events | ||
$triggerExecTimes | When to execute the trigger | ||
$triggerFrequency | How often to execute the trigger | ||
$typAlignDef | The default type alignment | ||
$typAligns | Array of allowed type alignments | ||
$typIndexDef | Default index type | ||
$typIndexes | Array of allowed index types | ||
$typStorageDef | The default type storage | ||
$typStorages | Array of allowed type storage attributes |
Méthode | Description | |
---|---|---|
Postgres ( $conn ) | Constructor | |
_encryptPassword ( $username, $password ) | Helper function that computes encypted PostgreSQL passwords | |
_parseACL ( $acl ) : Privileges | Internal function used for parsing ACLs | |
addCheckConstraint ( $table, $definition, $name = '' ) | Adds a check constraint to a table | |
addColumn ( $table, $column, $type, $array, $length, $notnull, $default, $comment ) | Add a new column to a table | |
addDomainCheckConstraint ( $domain, $definition, $name = '' ) | Adds a check constraint to a domain | |
addForeignKey ( $table, $targschema, $targtable, $sfields, $tfields, $upd_action, $del_action, $match, $deferrable, $initially, $name = '' ) : -1 | Adds a foreign key constraint to a table | |
addGroupMember ( $groname, $user ) | Adds a group member | |
addPrimaryKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 | Adds a primary key constraint to a table | |
addUniqueKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 | Adds a unique constraint to a table | |
alreadyClustered ( $table ) : true | test if a table has been clustered on an index | |
alterAggregate ( $aggrname, $aggrtype, $aggrowner, $aggrschema, $aggrcomment, $newaggrname, $newaggrowner, $newaggrschema, $newaggrcomment ) : -4 | Alters an aggregate | |
alterColumn ( $table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, $type, $length, $array, $oldtype, $comment ) : -6 | Alters a column in a table | |
alterDatabase ( $dbName, $newName, $newOwner = '', $comment = '' ) : -4 | Alters a database the multiple return vals are for postgres 8+ which support more functionality in alter database | |
alterDatabaseOwner ( string $dbName, string $newOwner ) : integer | Changes ownership of a database This can only be done by a superuser or the owner of the database | |
alterDatabaseRename ( string $oldName, string $newName ) : integer | Renames a database, note that this operation cannot be performed on a database that is currently being connected to | |
alterDomain ( $domain, $domdefault, $domnotnull, $domowner ) : -4 | Alters a domain | |
alterSequence ( $sequence, $name, $comment, $owner = null, $schema = null, $increment = null, $minvalue = null, $maxvalue = null, $restartvalue = null, $cachevalue = null, $cycledvalue = null, $startvalue = null ) : -2 | Alters a sequence | |
alterSequenceName ( $seqrs, $name ) | Rename a sequence | |
alterSequenceOwner ( $seqrs, $owner ) | Alter a sequence's owner | |
alterSequenceProps ( $seqrs, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) | Alter a sequence's properties | |
alterSequenceSchema ( $seqrs, $schema ) | Alter a sequence's schema | |
alterTable ( $table, $name, $owner, $schema, $comment, $tablespace ) : -2 | Alter table properties | |
alterTableName ( $tblrs, $name = null ) | Alter a table's name !\ this function is called from _alterTable which take care of escaping fields | |
alterTableOwner ( $tblrs, $owner = null ) | Alter a table's owner !\ this function is called from _alterTable which take care of escaping fields | |
alterTableSchema ( $tblrs, $schema = null ) | Alter a table's schema !\ this function is called from _alterTable which take care of escaping fields | |
alterTableTablespace ( $tblrs, $tablespace = null ) | Alter a table's tablespace !\ this function is called from _alterTable which take care of escaping fields | |
alterTablespace ( $spcname, $name, $owner, $comment = '' ) : -4 | Alters a tablespace | |
alterTrigger ( $table, $trigger, $name ) | Alters a trigger | |
alterView ( $view, $name, $owner, $schema, $comment ) : -2 | Alter view properties | |
alterViewName ( $vwrs, $name ) | Rename a view | |
alterViewOwner ( $vwrs, $owner = null ) | Alter a view's owner | |
alterViewSchema ( $vwrs, $schema ) | Alter a view's schema | |
analyzeDB ( $table = '' ) | Analyze a database | |
arrayClean ( &$arr ) : The | Cleans (escapes) an array | |
beginDump ( ) | Sets up the data object for a dump. eg. Starts the appropriate transaction, sets variables, etc. | |
browseQuery ( $type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages ) : -5 | Returns a recordset of all columns in a query. Supports paging. | |
browseQueryCount ( $query, $count ) : -1 | Finds the number of rows that would be returned by a query. | |
browseRow ( $table, $key ) : A | Returns a recordset of all columns in a table | |
changeAggregateOwner ( $aggrname, $aggrtype, $newaggrowner ) | Changes the owner of an aggregate function | |
changeAggregateSchema ( $aggrname, $aggrtype, $newaggrschema ) | Changes the schema of an aggregate function | |
changeFtsMapping ( $ftscfg, array $mapping, string $action, string $dictname = null ) | Creates/updates/deletes FTS mapping. | |
changePassword ( $rolename, $password ) | Changes a role's password | |
clean ( &$str ) : The | Cleans (escapes) a string | |
clusterIndex ( $table = '', $index = '' ) | Clusters an index | |
createAggregate ( $name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment ) : -1 | Creates a new aggregate in the database | |
createCompositeType ( $name, $fields, $field, $type, $array, $length, $colcomment, $typcomment ) : -1 | Creates a new composite type in the database | |
createDatabase ( $database, $encoding, $tablespace = '', $comment = '', $template = 'template1', $lc_collate = '', $lc_ctype = '' ) : -2 | Creates a database | |
createDomain ( $domain, $type, $length, $array, $notnull, $default, $check ) | Creates a domain | |
createEnumType ( $name, $values, $typcomment ) : -2 | Creates a new enum type in the database | |
createFtsConfiguration ( string $cfgname, string $parser = '', string $template = '', string $comment = '' ) | Creates a new FTS configuration. | |
createFtsDictionary ( string $dictname, boolean $isTemplate = false, string $template = '', string $lexize = '', string $init = '', string $option = '', string $comment = '' ) | Creates a new FTS dictionary or FTS dictionary template. | |
createFunction ( $funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false ) : -4 | Creates a new function. | |
createGroup ( $groname, $users ) | Creates a new group | |
createIndex ( $name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently ) | Creates an index | |
createRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers ) | Creates a new role | |
createRule ( $name, $event, $table, $where, $instead, $type, $action, $replace = false ) : -1 | Creates a rule | |
createSchema ( $schemaname, $authorization = '', $comment = '' ) | Creates a new schema. | |
createSequence ( $sequence, $increment, $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue ) | Creates a new sequence | |
createTable ( $name, $fields, $field, $type, $array, $length, $notnull, $default, $withoutoids, $colcomment, $tblcomment, $tablespace, $uniquekey, $primarykey ) : -1 | Creates a new table in the database | |
createTableLike ( $name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '' ) | Creates a new table in the database copying attribs and other properties from another table | |
createTablespace ( $spcname, $spcowner, $spcloc, $comment = '' ) | Creates a tablespace | |
createTrigger ( $tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs ) | Creates a trigger | |
createType ( $typname, $typin, $typout, $typlen, $typdef, $typelem, $typdelim, $typbyval, $typalign, $typstorage ) | Creates a new type | |
createUser ( $username, $password, $createdb, $createuser, $expiry, $groups ) | Creates a new user | |
createView ( $viewname, $definition, $replace, $comment ) | Creates a new view. | |
dbBool ( &$parameter ) | Change the value of a parameter to 't' or 'f' depending on whether it evaluates to true or false | |
deleteRow ( $table, $key, $schema = false ) | Delete a row from a table | |
disableTrigger ( $tgname, $table ) | Disables a trigger | |
dropAggregate ( $aggrname, $aggrtype, $cascade ) | Removes an aggregate function from the database | |
dropAutovacuum ( $table ) | ||
dropCheckConstraint ( $table, $name ) : -4 | Drops a check constraint from a table | |
dropColumn ( $table, $column, $cascade ) | Drops a column from a table | |
dropColumnDefault ( $table, $column ) | Drops default value of a column | |
dropConstraint ( $constraint, $relation, $type, $cascade ) | Removes a constraint from a relation | |
dropDatabase ( $database ) | Drops a database | |
dropDomain ( $domain, $cascade ) | Drops a domain. | |
dropDomainConstraint ( $domain, $constraint, $cascade ) | Drops a domain constraint | |
dropFtsConfiguration ( $ftscfg, $cascade ) | Drops FTS coniguration | |
dropFtsDictionary ( $ftsdict, $cascade ) | Drops FTS dictionary | |
dropFunction ( $function_oid, $cascade ) | Drops a function. | |
dropGroup ( $groname ) | Removes a group | |
dropGroupMember ( $groname, $user ) | Removes a group member | |
dropIndex ( $index, $cascade ) | Removes an index from the database | |
dropOperator ( $operator_oid, $cascade ) | Drops an operator | |
dropRole ( $rolename ) | Removes a role | |
dropRule ( $rule, $relation, $cascade ) | Removes a rule from a table OR view | |
dropSchema ( $schemaname, $cascade ) | Drops a schema. | |
dropSequence ( $sequence, $cascade ) | Drops a given sequence | |
dropTable ( $table, $cascade ) | Removes a table from the database | |
dropTablespace ( $spcname ) | Drops a tablespace | |
dropTrigger ( $tgname, $table, $cascade ) | Drops a trigger | |
dropType ( $typname, $cascade ) | Drops a type. | |
dropUser ( $username ) | Removes a user | |
dropView ( $viewname, $cascade ) | Drops a view. | |
dumpRelation ( $relation, $oids ) : -1 | Returns a recordset of all columns in a relation. Used for data export. | |
editRow ( $table, $vars, $nulls, $format, $types, $keyarr ) : -1 | Updates a row in a table | |
emptyTable ( $table ) | Empties a table in the database | |
enableTrigger ( $tgname, $table ) | Enables a trigger | |
endDump ( ) | Ends the data object for a dump. | |
escapeBytea ( $data ) : Data | Escapes bytea data for display on the screen | |
executeScript ( $name, $callback = null ) : True | Executes an SQL script as a series of SQL statements. Returns the result of the final step. This is a very complicated lexer based on the REL7_4_STABLE src/bin/psql/mainloop.c lexer in the PostgreSQL source code. | |
fieldArrayClean ( &$arr ) : The | Cleans (escapes) an array of field names | |
fieldClean ( &$str ) : The | Cleans (escapes) an object name (eg. table, field) | |
findObject ( $term, $filter ) : A | Searches all system catalogs to find objects that match a certain name. | |
formatType ( $typname, $typmod ) | Formats a type correctly for display. Postgres 7.0 had no 'format_type' built-in function, and hence we need to do it manually. | |
formatValue ( $type, $format, $value ) : The | Formats a value or expression for sql purposes | |
getAggregate ( $name, $basetype ) : A | Gets all information for an aggregate | |
getAggregates ( ) : A | Gets all aggregates | |
getAttributeNames ( $table, $atts ) : -2 | Given an array of attnums and a relation, returns an array mapping attribute number to attribute name. | |
getAutovacuum ( ) : associative | Returns all autovacuum global configuration | |
getCasts ( ) : All | Returns a list of all casts in the database | |
getChangeUserSQL ( $user ) : The | Returns the SQL for changing the current user | |
getConstraints ( $table ) : A | Returns a list of all constraints on a table | |
getConstraintsWithFields ( $table ) : a | Returns a list of all constraints on a table, including constraint name, definition, related col and referenced namespace, table and col if needed | |
getConversions ( ) : All | Returns a list of all conversions in the database | |
getDatabase ( $database ) : The | Return all information about a particular database | |
getDatabaseComment ( string $database ) : recordset | Return the database comment of a db from the shared description table | |
getDatabaseEncoding ( ) : The | Returns the current database encoding | |
getDatabaseOwner ( string $database ) : recordset | Return the database owner of a db | |
getDatabases ( $currentdatabase = NULL ) : A | Return all database available on the server | |
getDefaultWithOid ( ) : default_with_oids | Returns the current default_with_oids setting | |
getDomain ( $domain ) : A | Gets all information for a single domain | |
getDomainConstraints ( $domain ) : A | Get domain constraints | |
getDomains ( ) : All | Return all domains in current schema. Excludes domain constraints. | |
getEnumValues ( $name ) : A | Get defined values for a given enum | |
getFtsConfigurationByName ( $ftscfg ) : FTS | Return all information related to a FTS configuration | |
getFtsConfigurationMap ( string $ftscfg ) : RecordSet | Returns the map of FTS configuration given (list of mappings (tokens) and their processing dictionaries) | |
getFtsConfigurations ( $all = true ) : A | Returns available FTS configurations | |
getFtsDictionaries ( $all = true ) | Returns FTS dictionaries available | |
getFtsDictionaryByName ( $ftsdict ) : RecordSet | Return all information relating to a FTS dictionary | |
getFtsDictionaryTemplates ( ) | Returns all FTS dictionary templates available | |
getFtsMappingByName ( $ftscfg, $mapping ) : FTS | Return all information related to a given FTS configuration's mapping | |
getFtsMappings ( $ftscfg ) | Return list of FTS mappings possible for given parser (specified by given configuration since configuration can only have 1 parser) | |
getFtsParsers ( $all = true ) : RecordSet | Returns FTS parsers available | |
getFunction ( $function_oid ) : Function | Returns all details for a particular function | |
getFunctionProperties ( $f ) : An | Returns an array containing a function's properties | |
getFunctions ( $all = false, $type = null ) : All | Returns a list of all functions in the database | |
getGroup ( $groname ) : All | Return users in a specific group | |
getGroups ( ) : All | Returns all groups in the database cluser | |
getHelp ( $help ) | Fetch a URL (or array of URLs) for a given help page. | |
getHelpPages ( ) | ||
getIndexes ( $table = '', $unique = false ) : A | Grabs a list of indexes for a table | |
getLanguages ( $all = false ) : A | Gets all languages | |
getLinkingKeys ( $tables ) : -1 | A function for getting all columns linked by foreign keys given a group of tables | |
getLocks ( ) : A | Returns table locks information in the current database | |
getMemberOf ( $rolename ) : All | Returns all role names which the role belongs to | |
getMembers ( $rolename, $admin = 'f' ) : All | Returns all role names that are members of a role | |
getOpClasses ( ) : A | Gets all opclasses | |
getOperator ( $operator_oid ) : Function | Returns all details for a particular operator | |
getOperators ( ) : All | Returns a list of all operators in the database | |
getPreparedXacts ( $database = null ) : A | Returns prepared transactions information | |
getPrivileges ( $object, $type, $table = null ) : -3 | Grabs an array of users and their privileges for an object, given its type. | |
getProcesses ( $database = null ) : A | Returns all available process information. | |
getReferrers ( $table ) : A | Finds the foreign keys that refer to the specified table | |
getRole ( $rolename ) : The | Returns information about a single role | |
getRoles ( $rolename = '' ) : All | Returns all roles in the database cluster | |
getRowIdentifier ( $table ) : -1 | Get the fields for uniquely identifying a row in a table | |
getRules ( $table ) : A | Returns a list of all rules on a table OR view | |
getSchemaByName ( $schema ) : Schema | Return all information relating to a schema | |
getSchemas ( ) : All | Return all schemas in the current database. | |
getSearchPath ( ) : Array | Return the current schema search path | |
getSelectSQL ( $table, $show, $values, $ops, $orderby = [] ) : The | Generates the SQL for the 'select' function | |
getSequence ( $sequence ) : A | Returns properties of a single sequence | |
getSequences ( $all = false ) : A | Returns all sequences in the current database | |
getStatsDatabase ( $database ) : A | Fetches statistics for a database | |
getStatsIndexIO ( $table ) : A | Fetches I/0 statistics for all indexes on a table | |
getStatsIndexTuples ( $table ) : A | Fetches tuple statistics for all indexes on a table | |
getStatsTableIO ( $table ) : A | Fetches I/0 statistics for a table | |
getStatsTableTuples ( $table ) : A | Fetches tuple statistics for a table | |
getTable ( $table ) : A | Returns table information | |
getTableAttributes ( $table, $field = '' ) : All | Retrieve the attribute definition of a table | |
getTableAutovacuum ( $table = '' ) : A | Returns all available autovacuum per table information. | |
getTableChildren ( $table ) : A | Finds the names and schemas of child tables | |
getTableDefPrefix ( $table, $clean = false ) : null | Returns the SQL definition for the table. | |
getTableDefSuffix ( $table ) : null | Returns extra table definition information that is most usefully dumped after the table contents for speed and efficiency reasons | |
getTableParents ( $table ) : A | Finds the names and schemas of parent tables (in order) | |
getTables ( $all = false ) : All | Return all tables in current database (and schema) | |
getTablespace ( $spcname ) : A | Retrieves a tablespace's information | |
getTablespaces ( $all = false ) : A | Retrieves information for all tablespaces | |
getTrigger ( $table, $trigger ) : A | Grabs a single trigger | |
getTriggerDef ( $trigger ) : The | A helper function for getTriggers that translates an array of attribute numbers to an array of field names. | |
getTriggerFunctions ( ) | Returns a list of all functions that can be used in triggers | |
getTriggers ( $table = '' ) : A | Grabs a list of triggers on a table | |
getType ( $typname ) : Type | Returns all details for a particular type | |
getTypes ( $all = false, $tabletypes = false, $domains = false ) : A | Returns a list of all types in the database | |
getUser ( $username ) : The | Returns information about a single user | |
getUsers ( ) : All | Returns all users in the database cluster | |
getVariables ( ) : A | Returns all available variable information. | |
getView ( $view ) : View | Returns all details for a particular view | |
getViews ( ) : All | Returns a list of all views in the database | |
grantRole ( $role, $rolename, $admin ) | Grants membership in a role | |
hasAggregateSortOp ( ) | Capabilities | |
hasAlterAggregate ( ) | ||
hasAlterColumnType ( ) | ||
hasAlterDatabase ( ) | ||
hasAlterDatabaseOwner ( ) | ||
hasAlterDatabaseRename ( ) | ||
hasAlterDomains ( ) | ||
hasAlterSchema ( ) | ||
hasAlterSchemaOwner ( ) | ||
hasAlterSequenceSchema ( ) | ||
hasAlterSequenceStart ( ) | ||
hasAlterTableSchema ( ) | ||
hasAutovacuum ( ) | ||
hasByteaHexDefault ( ) | ||
hasConcurrentIndexBuild ( ) | ||
hasCreateFieldWithConstraints ( ) | ||
hasCreateTableLike ( ) | ||
hasCreateTableLikeWithConstraints ( ) | ||
hasCreateTableLikeWithIndexes ( ) | ||
hasDatabaseCollation ( ) | ||
hasDisableTriggers ( ) | ||
hasDomainConstraints ( ) | ||
hasEnumTypes ( ) | ||
hasFTS ( ) | ||
hasForceReindex ( ) | ||
hasFunctionAlterOwner ( ) | ||
hasFunctionAlterSchema ( ) | ||
hasFunctionCosting ( ) | ||
hasFunctionGUC ( ) | ||
hasGrantOption ( ) | ||
hasMagicTypes ( ) | ||
hasNamedParams ( ) | ||
hasObjectID ( $table ) : null | Checks to see whether or not a table has a unique id column | |
hasPrepare ( ) | ||
hasPreparedXacts ( ) | ||
hasQueryCancel ( ) | ||
hasQueryKill ( ) | ||
hasReadOnlyQueries ( ) | ||
hasRecluster ( ) | ||
hasRoles ( ) | ||
hasServerAdminFuncs ( ) | ||
hasSharedComments ( ) | ||
hasTablespaces ( ) | ||
hasUserRename ( ) | ||
hasUserSignals ( ) | ||
hasVirtualTransactionId ( ) | ||
insertRow ( $table, $fields, $values, $nulls, $format, $types ) : -1 | Adds a new row to a table | |
isSuperUser ( $username = '' ) : True | Determines whether or not a user is a super user | |
nextvalSequence ( $sequence ) : -1 | Execute nextval on a given sequence | |
phpBool ( $parameter ) | Change a parameter from 't' or 'f' to a boolean, (others evaluate to false) | |
printField ( $name, $value, $type, $extras = [] ) | Outputs the HTML code for a particular field | |
reindex ( $type, $name, $force = false ) | Rebuild indexes | |
renameAggregate ( $aggrschema, $aggrname, $aggrtype, $newaggrname ) | Renames an aggregate function | |
renameColumn ( $table, $column, $newName ) | Renames a column in a table | |
renameRole ( $rolename, $newrolename ) | Renames a role | |
renameUser ( $username, $newname ) | Renames a user | |
resetSequence ( $sequence ) : -1 | Resets a given sequence to min value of sequence | |
restartSequence ( $sequence ) : -1 | Restart a given sequence to its start value | |
revokeRole ( $role, $rolename, $admin, $type = 'RESTRICT' ) | Revokes membership in a role | |
saveAutovacuum ( $table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, $anascalefactor, $vaccostdelay, $vaccostlimit ) : A | Returns all available autovacuum per table information. | |
sendSignal ( $pid, $signal ) : -1 | Sends a cancel or kill command to a process | |
setColumnDefault ( $table, $column, $default ) | Sets default value of a column | |
setColumnNull ( $table, $column, $state ) | Sets whether or not a column can contain NULLs | |
setComment ( $obj_type, $obj_name, $table, $comment, $basetype = NULL ) | Sets the comment for an object in the database | |
setFunction ( $function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $funcown, $newown, $funcschema, $newschema, $cost, $rows, $comment ) : -7 | Updates (replaces) a function. | |
setPrivileges ( $mode, $type, $object, $public, $usernames, $groupnames, $privileges, $grantoption, $cascade, $table ) : -4 | Grants a privilege to a user, group or public | |
setRenameRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold, $newrolename ) : -3 | Adjusts a role's info and renames it | |
setRenameUser ( $username, $password, $createdb, $createuser, $expiry, $newname ) : -3 | Adjusts a user's info and renames the user | |
setRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold ) | Adjusts a role's info | |
setRule ( $name, $event, $table, $where, $instead, $type, $action ) : -1 | Edits a rule on a table OR view | |
setSchema ( $schema ) | Sets the current working schema. Will also set Class variable. | |
setSearchPath ( $paths ) : -2 | Sets the current schema search path | |
setUser ( $username, $password, $createdb, $createuser, $expiry ) | Adjusts a user's info | |
setView ( $viewname, $definition, $comment ) : -3 | Updates a view. | |
setvalSequence ( $sequence, $nextvalue ) : -1 | Execute setval on a given sequence | |
updateFtsConfiguration ( $cfgname, $comment, $name ) | Alters FTS configuration | |
updateFtsDictionary ( $dictname, $comment, $name ) | Alters FTS dictionary or dictionary template | |
updateSchema ( $schemaname, $comment, $name, $owner ) | Updates a schema. | |
vacuumDB ( $table = '', $analyze = false, $full = false, $freeze = false ) | Vacuums a database |
Méthode | Description | |
---|---|---|
_alterSequence ( $seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) : -7 | Protected method which alter a sequence SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION | |
_alterTable ( $tblrs, $name, $owner, $schema, $comment, $tablespace ) : -7 | Protected method which alter a table SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION | |
_alterView ( $vwrs, $name, $owner, $schema, $comment ) : -6 | Protected method which alter a view SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION |
Méthode | Description | |
---|---|---|
advance_1 ( &$i, &$prevlen, &$thislen ) | A private helper method for executeScript that advances the character by 1. In psql this is careful to take into account multibyte languages, but we don't at the moment, so this function is someone redundant, since it will always advance by 1 | |
valid_dolquote ( $dquote ) : True | Private helper method to detect a valid $foo$ quote delimiter at the start of the parameter dquote |
protected _alterSequence ( $seqrs, $name, $comment, $owner, $schema, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) : -7 | ||
$seqrs | The sequence recordSet returned by getSequence() | |
$name | The new name for the sequence | |
$comment | The comment on the sequence | |
$owner | The new owner for the sequence | |
$schema | The new schema for the sequence | |
$increment | The increment | |
$minvalue | The min value | |
$maxvalue | The max value | |
$restartvalue | The starting value | |
$cachevalue | The cache value | |
$cycledvalue | True if cycled, false otherwise | |
$startvalue | The sequence start value when issueing a restart | |
Résultat | -7 |
protected _alterTable ( $tblrs, $name, $owner, $schema, $comment, $tablespace ) : -7 | ||
$tblrs | The table recordSet returned by getTable() | |
$name | The new name for the table | |
$owner | The new owner for the table | |
$schema | The new schema for the table | |
$comment | The comment on the table | |
$tablespace | The new tablespace for the table ('' means leave as is) | |
Résultat | -7 |
protected _alterView ( $vwrs, $name, $owner, $schema, $comment ) : -6 | ||
$vwrs | The view recordSet returned by getView() | |
$name | The new name for the view | |
$owner | The new owner for the view | |
$comment | The comment on the view | |
Résultat | -6 |
public _encryptPassword ( $username, $password ) | ||
$username | The username | |
$password | The password |
public _parseACL ( $acl ) : Privileges | ||
$acl | The ACL to parse (of type aclitem[]) | |
Résultat | Privileges | array |
public addCheckConstraint ( $table, $definition, $name = '' ) | ||
$table | The table to which to add the check | |
$definition | The definition of the check | |
$name | (optional) The name to give the check, otherwise default name is assigned |
public addColumn ( $table, $column, $type, $array, $length, $notnull, $default, $comment ) | ||
$table | The table to add to | |
$column | The name of the new column | |
$type | The type of the column | |
$array | True if array type, false otherwise | |
$length | The optional size of the column (ie. 30 for varchar(30)) | |
$notnull | True if NOT NULL, false otherwise | |
$default | The default for the column. '' for none. |
public addDomainCheckConstraint ( $domain, $definition, $name = '' ) | ||
$domain | The domain to which to add the check | |
$definition | The definition of the check | |
$name | (optional) The name to give the check, otherwise default name is assigned |
public addForeignKey ( $table, $targschema, $targtable, $sfields, $tfields, $upd_action, $del_action, $match, $deferrable, $initially, $name = '' ) : -1 | ||
$targschema | The schema that houses the target table to which to add the foreign key | |
$targtable | The table to which to add the foreign key | |
$sfields | (array) An array of source fields over which to add the foreign key | |
$tfields | (array) An array of target fields over which to add the foreign key | |
$upd_action | The action for updates (eg. RESTRICT) | |
$del_action | The action for deletes (eg. RESTRICT) | |
$match | The match type (eg. MATCH FULL) | |
$deferrable | The deferrability (eg. NOT DEFERRABLE) | |
$name | (optional) The name to give the key, otherwise default name is assigned | |
Résultat | -1 |
public addGroupMember ( $groname, $user ) | ||
$groname | The name of the group | |
$user | The name of the user to add to the group |
public addPrimaryKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 | ||
$table | The table to which to add the primery key | |
$fields | (array) An array of fields over which to add the primary key | |
$name | (optional) The name to give the key, otherwise default name is assigned | |
$tablespace | (optional) The tablespace for the schema, '' indicates default. | |
Résultat | -1 |
public addUniqueKey ( $table, $fields, $name = '', $tablespace = '' ) : -1 | ||
$table | The table to which to add the unique key | |
$fields | (array) An array of fields over which to add the unique key | |
$name | (optional) The name to give the key, otherwise default name is assigned | |
$tablespace | (optional) The tablespace for the schema, '' indicates default. | |
Résultat | -1 |
public alreadyClustered ( $table ) : true | ||
$table | The table to test | |
Résultat | true | if the table has been already clustered |
public alterAggregate ( $aggrname, $aggrtype, $aggrowner, $aggrschema, $aggrcomment, $newaggrname, $newaggrowner, $newaggrschema, $newaggrcomment ) : -4 | ||
$aggrname | The actual name of the aggregate | |
$aggrtype | The actual input data type of the aggregate | |
$aggrowner | The actual owner of the aggregate | |
$aggrschema | The actual schema the aggregate belongs to | |
$aggrcomment | The actual comment for the aggregate | |
$newaggrname | The new name of the aggregate | |
$newaggrowner | The new owner of the aggregate | |
$newaggrschema | The new schema where the aggregate will belong to | |
$newaggrcomment | The new comment for the aggregate | |
Résultat | -4 |
public alterColumn ( $table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, $type, $length, $array, $oldtype, $comment ) : -6 | ||
$table | The table in which the column resides | |
$column | The column to alter | |
$name | The new name for the column | |
$notnull | (boolean) True if not null, false otherwise | |
$oldnotnull | (boolean) True if column is already not null, false otherwise | |
$default | The new default for the column | |
$olddefault | The old default for the column | |
$type | The new type for the column | |
$length | The optional size of the column (ie. 30 for varchar(30)) | |
$array | True if array type, false otherwise | |
$oldtype | The old type for the column | |
$comment | Comment for the column | |
Résultat | -6 |
public alterDatabase ( $dbName, $newName, $newOwner = '', $comment = '' ) : -4 | ||
$dbName | The name of the database | |
$newName | new name for the database | |
$newOwner | The new owner for the database | |
Résultat | -4 |
public alterDomain ( $domain, $domdefault, $domnotnull, $domowner ) : -4 | ||
$domain | The domain to alter | |
$domdefault | The domain default | |
$domnotnull | True for NOT NULL, false otherwise | |
$domowner | The domain owner | |
Résultat | -4 |
public alterSequence ( $sequence, $name, $comment, $owner = null, $schema = null, $increment = null, $minvalue = null, $maxvalue = null, $restartvalue = null, $cachevalue = null, $cycledvalue = null, $startvalue = null ) : -2 | ||
$sequence | The name of the sequence | |
$name | The new name for the sequence | |
$comment | The comment on the sequence | |
$owner | The new owner for the sequence | |
$schema | The new schema for the sequence | |
$increment | The increment | |
$minvalue | The min value | |
$maxvalue | The max value | |
$restartvalue | The starting value | |
$cachevalue | The cache value | |
$cycledvalue | True if cycled, false otherwise | |
$startvalue | The sequence start value when issueing a restart | |
Résultat | -2 |
public alterSequenceName ( $seqrs, $name ) | ||
$seqrs | The sequence RecordSet returned by getSequence() | |
$name | The new name for the sequence |
public alterSequenceOwner ( $seqrs, $owner ) | ||
$seqrs | The sequence RecordSet returned by getSequence() |
public alterSequenceProps ( $seqrs, $increment, $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue ) | ||
$seqrs | The sequence RecordSet returned by getSequence() | |
$increment | The sequence incremental value | |
$minvalue | The sequence minimum value | |
$maxvalue | The sequence maximum value | |
$restartvalue | The sequence current value | |
$cachevalue | The sequence cache value | |
$cycledvalue | Sequence can cycle ? | |
$startvalue | The sequence start value when issueing a restart |
public alterSequenceSchema ( $seqrs, $schema ) | ||
$seqrs | The sequence RecordSet returned by getSequence() |
public alterTable ( $table, $name, $owner, $schema, $comment, $tablespace ) : -2 | ||
$table | The name of the table | |
$name | The new name for the table | |
$owner | The new owner for the table | |
$schema | The new schema for the table | |
$comment | The comment on the table | |
$tablespace | The new tablespace for the table ('' means leave as is) | |
Résultat | -2 |
public alterTableName ( $tblrs, $name = null ) | ||
$tblrs | The table RecordSet returned by getTable() | |
$name | The new table's name |
public alterTableOwner ( $tblrs, $owner = null ) | ||
$tblrs | The table RecordSet returned by getTable() |
public alterTableSchema ( $tblrs, $schema = null ) | ||
$tblrs | The table RecordSet returned by getTable() |
public alterTableTablespace ( $tblrs, $tablespace = null ) | ||
$tblrs | The table RecordSet returned by getTable() |
public alterTablespace ( $spcname, $name, $owner, $comment = '' ) : -4 | ||
$spcname | The name of the tablespace | |
$name | The new name for the tablespace | |
$owner | The new owner for the tablespace | |
Résultat | -4 |
public alterTrigger ( $table, $trigger, $name ) | ||
$table | The name of the table containing the trigger | |
$trigger | The name of the trigger to alter | |
$name | The new name for the trigger |
public alterView ( $view, $name, $owner, $schema, $comment ) : -2 | ||
$view | The name of the view | |
$name | The new name for the view | |
$owner | The new owner for the view | |
$schema | The new schema for the view | |
$comment | The comment on the view | |
Résultat | -2 |
public alterViewName ( $vwrs, $name ) | ||
$vwrs | The view recordSet returned by getView() | |
$name | The new view's name |
public alterViewOwner ( $vwrs, $owner = null ) | ||
$vwrs | The view recordSet returned by getView() |
public alterViewSchema ( $vwrs, $schema ) | ||
$vwrs | The view recordSet returned by getView() |
public analyzeDB ( $table = '' ) | ||
$table | (optional) The table to analyze |
public arrayClean ( &$arr ) : The | ||
$arr | The array to clean, by reference | |
Résultat | The | cleaned array |
public beginDump ( ) |
public browseQuery ( $type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages ) : -5 | ||
$type | Either 'QUERY' if it is an SQL query, or 'TABLE' if it is a table identifier, or 'SELECT" if it's a select query | |
$table | The base table of the query. NULL for no table. | |
$query | The query that is being executed. NULL for no query. | |
$sortkey | The column number to sort by, or '' or null for no sorting | |
$sortdir | The direction in which to sort the specified column ('asc' or 'desc') | |
$page | The page of the relation to retrieve | |
$page_size | The number of rows per page | |
Résultat | -5 | recordset on success |
public browseQueryCount ( $query, $count ) : -1 | ||
$query | The SQL query | |
$count | The count query | |
Résultat | -1 | count of rows |
public browseRow ( $table, $key ) : A | ||
$table | The name of a table | |
$key | The associative array holding the key to retrieve | |
Résultat | A | recordset |
public changeAggregateOwner ( $aggrname, $aggrtype, $newaggrowner ) | ||
$aggrname | The name of the aggregate | |
$aggrtype | The input data type of the aggregate | |
$newaggrowner | The new owner of the aggregate |
public changeAggregateSchema ( $aggrname, $aggrtype, $newaggrschema ) | ||
$aggrname | The name of the aggregate | |
$aggrtype | The input data type of the aggregate | |
$newaggrschema | The new schema for the aggregate |
public changePassword ( $rolename, $password ) | ||
$rolename | The role name | |
$password | The new password |
public clean ( &$str ) : The | ||
$str | The string to clean, by reference | |
Résultat | The | cleaned string |
public clusterIndex ( $table = '', $index = '' ) | ||
$table | The table the index is on | |
$index | The name of the index |
public createAggregate ( $name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment ) : -1 | ||
$name | The name of the aggregate | |
$basetype | The input data type of the aggregate | |
$sfunc | The name of the state transition function for the aggregate | |
$stype | The data type for the aggregate's state value | |
$ffunc | The name of the final function for the aggregate | |
$initcond | The initial setting for the state value | |
$sortop | The sort operator for the aggregate | |
$comment | Aggregate comment | |
Résultat | -1 |
public createCompositeType ( $name, $fields, $field, $type, $array, $length, $colcomment, $typcomment ) : -1 | ||
$name | The name of the type | |
$fields | The number of fields | |
$field | An array of field names | |
$type | An array of field types | |
$array | An array of '' or '[]' for each type if it's an array or not | |
$length | An array of field lengths | |
$colcomment | An array of comments | |
$typcomment | Type comment | |
Résultat | -1 |
public createDatabase ( $database, $encoding, $tablespace = '', $comment = '', $template = 'template1', $lc_collate = '', $lc_ctype = '' ) : -2 | ||
$database | The name of the database to create | |
$encoding | Encoding of the database | |
$tablespace | (optional) The tablespace name | |
Résultat | -2 |
public createDomain ( $domain, $type, $length, $array, $notnull, $default, $check ) | ||
$domain | The name of the domain to create | |
$type | The base type for the domain | |
$length | Optional type length | |
$array | True for array type, false otherwise | |
$notnull | True for NOT NULL, false otherwise | |
$default | Default value for domain | |
$check | A CHECK constraint if there is one |
public createEnumType ( $name, $values, $typcomment ) : -2 | ||
$name | The name of the type | |
$values | An array of values | |
$typcomment | Type comment | |
Résultat | -2 |
public createFtsConfiguration ( string $cfgname, string $parser = '', string $template = '', string $comment = '' ) | ||
$cfgname | string | The name of the FTS configuration to create |
$parser | string | The parser to be used in new FTS configuration |
$template | string | The existing FTS configuration to be used as template for the new one |
$comment | string | If omitted, defaults to nothing |
public createFtsDictionary ( string $dictname, boolean $isTemplate = false, string $template = '', string $lexize = '', string $init = '', string $option = '', string $comment = '' ) | ||
$dictname | string | The name of the FTS dictionary to create |
$isTemplate | boolean | Flag whether we create usual dictionary or dictionary template |
$template | string | The existing FTS dictionary to be used as template for the new one |
$lexize | string | The name of the function, which does transformation of input word |
$init | string | The name of the function, which initializes dictionary |
$option | string | Usually, it stores various options required for the dictionary |
$comment | string | If omitted, defaults to nothing |
public createFunction ( $funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false ) : -4 | ||
$funcname | The name of the function to create | |
$args | A comma separated string of types | |
$returns | The return type | |
$definition | The definition for the new function | |
$language | The language the function is written for | |
$flags | An array of optional flags | |
$setof | True if it returns a set, false otherwise | |
$cost | cost the planner should use in the function execution step | |
$rows | number of rows planner should estimate will be returned | |
$comment | Comment for the function | |
$replace | (optional) True if OR REPLACE, false for normal | |
Résultat | -4 |
public createGroup ( $groname, $users ) | ||
$groname | The name of the group | |
$users | An array of users to add to the group |
public createIndex ( $name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently ) | ||
$name | The index name | |
$table | The table on which to add the index | |
$columns | An array of columns that form the index or a string expression for a functional index | |
$type | The index type | |
$unique | True if unique, false otherwise | |
$where | Index predicate ('' for none) | |
$tablespace | The tablespaces ('' means none/default) |
public createRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers ) | ||
$rolename | The name of the role to create | |
$password | A password for the role | |
$superuser | Boolean whether or not the role is a superuser | |
$createdb | Boolean whether or not the role can create databases | |
$createrole | Boolean whether or not the role can create other roles | |
$inherits | Boolean whether or not the role inherits the privileges from parent roles | |
$login | Boolean whether or not the role will be allowed to login | |
$connlimit | Number of concurrent connections the role can make | |
$expiry | String Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire | |
$memberof | (array) Roles to which the new role will be immediately added as a new member | |
$members | (array) Roles which are automatically added as members of the new role | |
$adminmembers | (array) Roles which are automatically added as admin members of the new role |
public createRule ( $name, $event, $table, $where, $instead, $type, $action, $replace = false ) : -1 | ||
$name | The name of the new rule | |
$event | SELECT, INSERT, UPDATE or DELETE | |
$table | Table on which to create the rule | |
$where | When to execute the rule, '' indicates always | |
$instead | True if an INSTEAD rule, false otherwise | |
$type | NOTHING for a do nothing rule, SOMETHING to use given action | |
$action | The action to take | |
$replace | (optional) True to replace existing rule, false otherwise | |
Résultat | -1 |
public createSchema ( $schemaname, $authorization = '', $comment = '' ) | ||
$schemaname | The name of the schema to create | |
$authorization | (optional) The username to create the schema for. | |
$comment | (optional) If omitted, defaults to nothing |
public createSequence ( $sequence, $increment, $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue ) | ||
$sequence | Sequence name | |
$increment | The increment | |
$minvalue | The min value | |
$maxvalue | The max value | |
$startvalue | The starting value | |
$cachevalue | The cache value | |
$cycledvalue | True if cycled, false otherwise |
public createTable ( $name, $fields, $field, $type, $array, $length, $notnull, $default, $withoutoids, $colcomment, $tblcomment, $tablespace, $uniquekey, $primarykey ) : -1 | ||
$name | The name of the table | |
$fields | The number of fields | |
$field | An array of field names | |
$type | An array of field types | |
$array | An array of '' or '[]' for each type if it's an array or not | |
$length | An array of field lengths | |
$notnull | An array of not null | |
$default | An array of default values | |
$withoutoids | True if WITHOUT OIDS, false otherwise | |
$colcomment | An array of comments | |
$tablespace | The tablespace name ('' means none/default) | |
$uniquekey | An Array indicating the fields that are unique (those indexes that are set) | |
$primarykey | An Array indicating the field used for the primarykey (those indexes that are set) | |
Résultat | -1 |
public createTableLike ( $name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '' ) | ||
$name | The name of the table | |
$like | an array giving the schema ans the name of the table from which attribs are copying from: array( 'table' => table name, 'schema' => the schema name, ) | |
$defaults | if true, copy the defaults values as well | |
$constraints | if true, copy the constraints as well (CHECK on table & attr) | |
$tablespace | The tablespace name ('' means none/default) |
public createTablespace ( $spcname, $spcowner, $spcloc, $comment = '' ) | ||
$spcname | The name of the tablespace to create | |
$spcowner | The owner of the tablespace. '' for current | |
$spcloc | The directory in which to create the tablespace |
public createTrigger ( $tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs ) | ||
$tgname | The name of the trigger to create | |
$table | The name of the table | |
$tgproc | The function to execute | |
$tgtime | BEFORE or AFTER | |
$tgevent | Event | |
$tgargs | The function arguments |
public createType ( $typname, $typin, $typout, $typlen, $typdef, $typelem, $typdelim, $typbyval, $typalign, $typstorage ) |
public createUser ( $username, $password, $createdb, $createuser, $expiry, $groups ) | ||
$username | The username of the user to create | |
$password | A password for the user | |
$createdb | boolean Whether or not the user can create databases | |
$createuser | boolean Whether or not the user can create other users | |
$expiry | string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire |
public createView ( $viewname, $definition, $replace, $comment ) | ||
$viewname | The name of the view to create | |
$definition | The definition for the new view | |
$replace | True to replace the view, false otherwise |
public dbBool ( &$parameter ) | ||
$parameter | the parameter |
public deleteRow ( $table, $key, $schema = false ) | ||
$table | The table from which to delete | |
$key | An array mapping column => value to delete |
public disableTrigger ( $tgname, $table ) | ||
$tgname | The name of the trigger to disable | |
$table | The table in which to disable the trigger |
public dropAggregate ( $aggrname, $aggrtype, $cascade ) | ||
$aggrname | The name of the aggregate | |
$aggrtype | The input data type of the aggregate | |
$cascade | True to cascade drop, false to restrict |
public dropCheckConstraint ( $table, $name ) : -4 | ||
$table | The table from which to drop the check | |
$name | The name of the check to be dropped | |
Résultat | -4 |
public dropColumn ( $table, $column, $cascade ) | ||
$table | The table from which to drop a column | |
$column | The column to be dropped | |
$cascade | True to cascade drop, false to restrict |
public dropColumnDefault ( $table, $column ) | ||
$table | The table from which to drop | |
$column | The column name to drop default |
public dropConstraint ( $constraint, $relation, $type, $cascade ) | ||
$constraint | The constraint to drop | |
$relation | The relation from which to drop | |
$type | The type of constraint (c, f, u or p) | |
$cascade | True to cascade drop, false to restrict |
public dropDatabase ( $database ) | ||
$database | The name of the database to drop |
public dropDomain ( $domain, $cascade ) | ||
$domain | The name of the domain to drop | |
$cascade | True to cascade drop, false to restrict |
public dropDomainConstraint ( $domain, $constraint, $cascade ) | ||
$domain | The domain from which to remove the constraint | |
$constraint | The constraint to remove | |
$cascade | True to cascade, false otherwise |
public dropFtsConfiguration ( $ftscfg, $cascade ) | ||
$ftscfg | The configuration's name | |
$cascade | Cascade to dependenced objects |
public dropFtsDictionary ( $ftsdict, $cascade ) | ||
$ftsdict | The dico's name | |
$cascade | Cascade to dependenced objects |
public dropFunction ( $function_oid, $cascade ) | ||
$function_oid | The OID of the function to drop | |
$cascade | True to cascade drop, false to restrict |
public dropGroup ( $groname ) | ||
$groname | The name of the group to drop |
public dropGroupMember ( $groname, $user ) | ||
$groname | The name of the group | |
$user | The name of the user to remove from the group |
public dropIndex ( $index, $cascade ) | ||
$index | The index to drop | |
$cascade | True to cascade drop, false to restrict |
public dropOperator ( $operator_oid, $cascade ) | ||
$operator_oid | The OID of the operator to drop | |
$cascade | True to cascade drop, false to restrict |
public dropRole ( $rolename ) | ||
$rolename | The name of the role to drop |
public dropRule ( $rule, $relation, $cascade ) | ||
$rule | The rule to drop | |
$relation | The relation from which to drop | |
$cascade | True to cascade drop, false to restrict |
public dropSchema ( $schemaname, $cascade ) | ||
$schemaname | The name of the schema to drop | |
$cascade | True to cascade drop, false to restrict |
public dropSequence ( $sequence, $cascade ) | ||
$sequence | Sequence name | |
$cascade | True to cascade drop, false to restrict |
public dropTable ( $table, $cascade ) | ||
$table | The table to drop | |
$cascade | True to cascade drop, false to restrict |
public dropTablespace ( $spcname ) | ||
$spcname | The name of the domain to drop |
public dropTrigger ( $tgname, $table, $cascade ) | ||
$tgname | The name of the trigger to drop | |
$table | The table from which to drop the trigger | |
$cascade | True to cascade drop, false to restrict |
public dropType ( $typname, $cascade ) | ||
$typname | The name of the type to drop | |
$cascade | True to cascade drop, false to restrict |
public dropUser ( $username ) | ||
$username | The username of the user to drop |
public dropView ( $viewname, $cascade ) | ||
$viewname | The name of the view to drop | |
$cascade | True to cascade drop, false to restrict |
public dumpRelation ( $relation, $oids ) : -1 | ||
$relation | The name of a relation | |
Résultat | -1 | recordset on success |
public editRow ( $table, $vars, $nulls, $format, $types, $keyarr ) : -1 | ||
$table | The table in which to update | |
$vars | An array mapping new values for the row | |
$nulls | An array mapping column => something if it is to be null | |
$format | An array of the data type (VALUE or EXPRESSION) | |
$types | An array of field types | |
$keyarr | An array mapping column => value to update | |
Résultat | -1 |
public emptyTable ( $table ) | ||
$table | The table to be emptied |
public enableTrigger ( $tgname, $table ) | ||
$tgname | The name of the trigger to enable | |
$table | The table in which to enable the trigger |
public escapeBytea ( $data ) : Data | ||
$data | The bytea data | |
Résultat | Data | formatted for on-screen display |
public executeScript ( $name, $callback = null ) : True | ||
$name | Entry in $_FILES to use | |
$callback | (optional) Callback function to call with each query, its result and line number. | |
Résultat | True | for general success, false on any failure. |
public fieldArrayClean ( &$arr ) : The | ||
$arr | The array to clean, by reference | |
Résultat | The | cleaned array |
public fieldClean ( &$str ) : The | ||
$str | The string to clean, by reference | |
Résultat | The | cleaned string |
public findObject ( $term, $filter ) : A | ||
$term | The search term | |
$filter | The object type to restrict to ('' means no restriction) | |
Résultat | A | recordset |
public formatType ( $typname, $typmod ) | ||
$typname | The name of the type | |
$typmod | The contents of the typmod field |
public formatValue ( $type, $format, $value ) : The | ||
$type | The type of the field | |
$format | VALUE or EXPRESSION | |
$value | The actual value entered in the field. Can be NULL | |
Résultat | The | suitably quoted and escaped value. |
public getAggregate ( $name, $basetype ) : A | ||
$name | The name of the aggregate | |
$basetype | The input data type of the aggregate | |
Résultat | A | recordset |
public getAggregates ( ) : A | ||
Résultat | A | recordset |
public getAttributeNames ( $table, $atts ) : -2 | ||
$table | The table to get attributes for | |
$atts | An array of attribute numbers | |
Résultat | -2 | array mapping attnum to attname |
public getAutovacuum ( ) : associative | ||
Résultat | associative | array array( param => value, ...) |
public getCasts ( ) : All | ||
Résultat | All | casts |
public getChangeUserSQL ( $user ) : The | ||
$user | The user to change to | |
Résultat | The | SQL |
public getConstraints ( $table ) : A | ||
$table | The table to find rules for | |
Résultat | A | recordset |
public getConstraintsWithFields ( $table ) : a | ||
$table | the table where we are looking for fk | |
Résultat | a | recordset |
public getConversions ( ) : All | ||
Résultat | All | conversions |
public getDatabase ( $database ) : The | ||
$database | The name of the database to retrieve | |
Résultat | The | database info |
public getDatabaseComment ( string $database ) : recordset | ||
$database | string | the name of the database to get the comment for |
Résultat | recordset | of the db comment info |
public getDatabaseEncoding ( ) : The | ||
Résultat | The | encoding. eg. SQL_ASCII, UTF-8, etc. |
public getDatabaseOwner ( string $database ) : recordset | ||
$database | string | the name of the database to get the owner for |
Résultat | recordset | of the db owner info |
public getDatabases ( $currentdatabase = NULL ) : A | ||
$currentdatabase | database name that should be on top of the resultset | |
Résultat | A | list of databases, sorted alphabetically |
public getDefaultWithOid ( ) : default_with_oids | ||
Résultat | default_with_oids | setting |
public getDomain ( $domain ) : A | ||
$domain | The name of the domain to fetch | |
Résultat | A | recordset |
public getDomainConstraints ( $domain ) : A | ||
$domain | The name of the domain whose constraints to fetch | |
Résultat | A | recordset |
public getDomains ( ) : All | ||
Résultat | All | tables, sorted alphabetically |
public getEnumValues ( $name ) : A | ||
Résultat | A | recordset |
public getFtsConfigurationByName ( $ftscfg ) : FTS | ||
$ftscfg | The name of the FTS configuration | |
Résultat | FTS | configuration information |
public getFtsConfigurationMap ( string $ftscfg ) : RecordSet | ||
$ftscfg | string | Name of the FTS configuration |
Résultat | RecordSet |
public getFtsConfigurations ( $all = true ) : A | ||
$all | if false, returns schema qualified FTS confs | |
Résultat | A | recordset |
public getFtsDictionaries ( $all = true ) | ||
$all | if false, return only Dics from the current schema |
public getFtsDictionaryByName ( $ftsdict ) : RecordSet | ||
$ftsdict | The name of the FTS dictionary | |
Résultat | RecordSet | of FTS dictionary information |
public getFtsDictionaryTemplates ( ) |
public getFtsMappingByName ( $ftscfg, $mapping ) : FTS | ||
$ftscfg | The name of the FTS configuration | |
$mapping | The name of the mapping | |
Résultat | FTS | configuration information |
public getFtsMappings ( $ftscfg ) | ||
$ftscfg | The config's name that use the parser |
public getFtsParsers ( $all = true ) : RecordSet | ||
$all | if false, return only Parsers from the current schema | |
Résultat | RecordSet |
public getFunction ( $function_oid ) : Function | ||
Résultat | Function | info |
public getFunctionProperties ( $f ) : An | ||
$f | The array of data for the function | |
Résultat | An | array containing the properties |
public getFunctions ( $all = false, $type = null ) : All | ||
$all | If true, will find all available functions, if false just those in search path | |
$type | If not null, will find all functions with return value = type | |
Résultat | All | functions |
public getGroup ( $groname ) : All | ||
$groname | The name of the group | |
Résultat | All | users in the group |
public getGroups ( ) : All | ||
Résultat | All | groups |
public getHelp ( $help ) |
public getIndexes ( $table = '', $unique = false ) : A | ||
$table | The name of a table whose indexes to retrieve | |
$unique | Only get unique/pk indexes | |
Résultat | A | recordset |
public getLanguages ( $all = false ) : A | ||
$all | True to get all languages, regardless of show_system | |
Résultat | A | recordset |
public getLinkingKeys ( $tables ) : -1 | ||
$tables | multi dimensional assoc array that holds schema and table name | |
Résultat | -1 | recordset of linked tables and columns |
public getLocks ( ) : A | ||
Résultat | A | recordset |
public getMemberOf ( $rolename ) : All | ||
$rolename | The role name | |
Résultat | All | role names |
public getMembers ( $rolename, $admin = 'f' ) : All | ||
$rolename | The role name | |
$admin | (optional) Find only admin members | |
Résultat | All | role names |
public getOperator ( $operator_oid ) : Function | ||
$operator_oid | The oid of the operator | |
Résultat | Function | info |
public getOperators ( ) : All | ||
Résultat | All | operators |
public getPreparedXacts ( $database = null ) : A | ||
$database | (optional) Find only prepared transactions executed in a specific database | |
Résultat | A | recordset |
public getPrivileges ( $object, $type, $table = null ) : -3 | ||
$object | The name of the object whose privileges are to be retrieved | |
$type | The type of the object (eg. database, schema, relation, function or language) | |
$table | Optional, column's table if type = column | |
Résultat | -3 | array |
public getProcesses ( $database = null ) : A | ||
$database | (optional) Find only connections to specified database | |
Résultat | A | recordset |
public getReferrers ( $table ) : A | ||
$table | The table to find referrers for | |
Résultat | A | recordset |
public getRole ( $rolename ) : The | ||
$rolename | The name of the role to retrieve | |
Résultat | The | role's data |
public getRoles ( $rolename = '' ) : All | ||
$rolename | (optional) The role name to exclude from the select | |
Résultat | All | roles |
public getRowIdentifier ( $table ) : -1 | ||
$table | The table for which to retrieve the identifier | |
Résultat | -1 | array mapping attribute number to attribute name, empty for no identifiers |
public getRules ( $table ) : A | ||
$table | The table to find rules for | |
Résultat | A | recordset |
public getSchemaByName ( $schema ) : Schema | ||
$schema | The name of the schema | |
Résultat | Schema | information |
public getSchemas ( ) : All | ||
Résultat | All | schemas, sorted alphabetically |
public getSearchPath ( ) : Array | ||
Résultat | Array | of schema names |
public getSelectSQL ( $table, $show, $values, $ops, $orderby = [] ) : The | ||
$table | The table from which to select | |
$show | An array of columns to show. Empty array means all columns. | |
$values | An array mapping columns to values | |
$ops | An array of the operators to use | |
$orderby | (optional) An array of column numbers or names (one based) mapped to sort direction (asc or desc or '' or null) to order by | |
Résultat | The | SQL query |
public getSequence ( $sequence ) : A | ||
$sequence | Sequence name | |
Résultat | A | recordset |
public getSequences ( $all = false ) : A | ||
Résultat | A | recordset |
public getStatsDatabase ( $database ) : A | ||
$database | The database to fetch stats for | |
Résultat | A | recordset |
public getStatsIndexIO ( $table ) : A | ||
$table | The table to fetch index stats for | |
Résultat | A | recordset |
public getStatsIndexTuples ( $table ) : A | ||
$table | The table to fetch index stats for | |
Résultat | A | recordset |
public getStatsTableIO ( $table ) : A | ||
$table | The table to fetch stats for | |
Résultat | A | recordset |
public getStatsTableTuples ( $table ) : A | ||
$table | The table to fetch stats for | |
Résultat | A | recordset |
public getTable ( $table ) : A | ||
$table | The name of the table | |
Résultat | A | recordset |
public getTableAttributes ( $table, $field = '' ) : All | ||
$table | The name of the table | |
$field | (optional) The name of a field to return | |
Résultat | All | attributes in order |
public getTableAutovacuum ( $table = '' ) : A | ||
$table | if given, return autovacuum info for the given table or return all informations for all table | |
Résultat | A | recordset |
public getTableChildren ( $table ) : A | ||
$table | The table to find the children for | |
Résultat | A | recordset |
public getTableDefPrefix ( $table, $clean = false ) : null | ||
$table | The table to define | |
$clean | True to issue drop command, false otherwise | |
Résultat | null | string containing the formatted SQL code |
public getTableDefSuffix ( $table ) : null | ||
$table | The table to define | |
Résultat | null | string containing the formatted SQL code |
public getTableParents ( $table ) : A | ||
$table | The table to find the parents for | |
Résultat | A | recordset |
public getTables ( $all = false ) : All | ||
$all | True to fetch all tables, false for just in current schema | |
Résultat | All | tables, sorted alphabetically |
public getTablespace ( $spcname ) : A | ||
Résultat | A | recordset |
public getTablespaces ( $all = false ) : A | ||
$all | Include all tablespaces (necessary when moving objects back to the default space) | |
Résultat | A | recordset |
public getTrigger ( $table, $trigger ) : A | ||
$table | The name of a table whose triggers to retrieve | |
$trigger | The name of the trigger to retrieve | |
Résultat | A | recordset |
public getTriggerDef ( $trigger ) : The | ||
$trigger | An array containing fields from the trigger table | |
Résultat | The | trigger definition string |
public getTriggerFunctions ( ) |
public getTriggers ( $table = '' ) : A | ||
$table | The name of a table whose triggers to retrieve | |
Résultat | A | recordset |
public getType ( $typname ) : Type | ||
$typname | The name of the view to retrieve | |
Résultat | Type | info |
public getTypes ( $all = false, $tabletypes = false, $domains = false ) : A | ||
$all | If true, will find all available types, if false just those in search path | |
$tabletypes | If true, will include table types | |
$domains | If true, will include domains | |
Résultat | A | recordet |
public getUser ( $username ) : The | ||
$username | The username of the user to retrieve | |
Résultat | The | user's data |
public getUsers ( ) : All | ||
Résultat | All | users |
public getVariables ( ) : A | ||
Résultat | A | recordset |
public getView ( $view ) : View | ||
$view | The name of the view to retrieve | |
Résultat | View | info |
public getViews ( ) : All | ||
Résultat | All | views |
public grantRole ( $role, $rolename, $admin ) | ||
$role | The name of the target role | |
$rolename | The name of the role that will belong to the target role | |
$admin | (optional) Flag to grant the admin option |
public hasObjectID ( $table ) : null | ||
$table | The table name | |
Résultat | null | if it has a unique id, false otherwise |
public insertRow ( $table, $fields, $values, $nulls, $format, $types ) : -1 | ||
$table | The table in which to insert | |
$fields | Array of given field in values | |
$values | Array of new values for the row | |
$nulls | An array mapping column => something if it is to be null | |
$format | An array of the data type (VALUE or EXPRESSION) | |
$types | An array of field types | |
Résultat | -1 |
public isSuperUser ( $username = '' ) : True | ||
$username | The username of the user | |
Résultat | True | if is a super user, false otherwise |
public nextvalSequence ( $sequence ) : -1 | ||
$sequence | Sequence name | |
Résultat | -1 |
public phpBool ( $parameter ) | ||
$parameter | the parameter |
public printField ( $name, $value, $type, $extras = [] ) | ||
$name | The name to give the field | |
$value | The value of the field. Note this could be 'numeric(7,2)' sort of thing... | |
$type | The database type of the field | |
$extras | An array of attributes name as key and attributes' values as value |
public reindex ( $type, $name, $force = false ) | ||
$type | 'DATABASE' or 'TABLE' or 'INDEX' | |
$name | The name of the specific database, table, or index to be reindexed | |
$force | If true, recreates indexes forcedly in PostgreSQL 7.0-7.1, forces rebuild of system indexes in 7.2-7.3, ignored in >=7.4 |
public renameAggregate ( $aggrschema, $aggrname, $aggrtype, $newaggrname ) | ||
$aggrname | The actual name of the aggregate | |
$aggrtype | The actual input data type of the aggregate | |
$newaggrname | The new name of the aggregate |
public renameColumn ( $table, $column, $newName ) | ||
$table | The table containing the column to be renamed | |
$column | The column to be renamed | |
$newName | The new name for the column |
public renameRole ( $rolename, $newrolename ) | ||
$rolename | The name of the role to rename | |
$newrolename | The new name of the role |
public renameUser ( $username, $newname ) | ||
$username | The username of the user to rename | |
$newname | The new name of the user |
public resetSequence ( $sequence ) : -1 | ||
$sequence | Sequence name | |
Résultat | -1 |
public restartSequence ( $sequence ) : -1 | ||
$sequence | Sequence name | |
Résultat | -1 |
public revokeRole ( $role, $rolename, $admin, $type = 'RESTRICT' ) | ||
$role | The name of the target role | |
$rolename | The name of the role that will not belong to the target role | |
$admin | (optional) Flag to revoke only the admin option | |
$type | (optional) Type of revoke: RESTRICT | CASCADE |
public saveAutovacuum ( $table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, $anascalefactor, $vaccostdelay, $vaccostlimit ) : A | ||
Résultat | A | recordset |
public sendSignal ( $pid, $signal ) : -1 | ||
$pid | The ID of the backend process | |
$signal | 'CANCEL' | |
Résultat | -1 |
public setColumnDefault ( $table, $column, $default ) | ||
$table | The table from which to drop | |
$column | The column name to set | |
$default | The new default value |
public setColumnNull ( $table, $column, $state ) | ||
$table | The table that contains the column | |
$column | The column to alter | |
$state | True to set null, false to set not null |
public setComment ( $obj_type, $obj_name, $table, $comment, $basetype = NULL ) | ||
$obj_type | One of 'TABLE' | 'COLUMN' | 'VIEW' | 'SCHEMA' | 'SEQUENCE' | 'TYPE' | 'FUNCTION' | 'AGGREGATE' | |
$obj_name | The name of the object for which to attach a comment. | |
$table | Name of table that $obj_name belongs to. Ignored unless $obj_type is 'TABLE' or 'COLUMN'. | |
$comment | The comment to add. |
public setFunction ( $function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $funcown, $newown, $funcschema, $newschema, $cost, $rows, $comment ) : -7 | ||
$function_oid | The OID of the function | |
$funcname | The name of the function to create | |
$newname | The new name for the function | |
$args | The array of argument types | |
$returns | The return type | |
$definition | The definition for the new function | |
$language | The language the function is written for | |
$flags | An array of optional flags | |
$setof | True if returns a set, false otherwise | |
$comment | The comment on the function | |
Résultat | -7 |
public setPrivileges ( $mode, $type, $object, $public, $usernames, $groupnames, $privileges, $grantoption, $cascade, $table ) : -4 | ||
$mode | 'GRANT' or 'REVOKE'; | |
$type | The type of object | |
$object | The name of the object | |
$public | True to grant to public, false otherwise | |
$usernames | The array of usernames to grant privs to. | |
$groupnames | The array of group names to grant privs to. | |
$privileges | The array of privileges to grant (eg. ('SELECT', 'ALL PRIVILEGES', etc.) ) | |
$grantoption | True if has grant option, false otherwise | |
$cascade | True for cascade revoke, false otherwise | |
$table | the column's table if type=column | |
Résultat | -4 |
public setRenameRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold, $newrolename ) : -3 | ||
$rolename | The name of the role to adjust | |
$password | A password for the role | |
$superuser | Boolean whether or not the role is a superuser | |
$createdb | Boolean whether or not the role can create databases | |
$createrole | Boolean whether or not the role can create other roles | |
$inherits | Boolean whether or not the role inherits the privileges from parent roles | |
$login | Boolean whether or not the role will be allowed to login | |
$connlimit | Number of concurrent connections the role can make | |
$expiry | string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire | |
$memberof | (array) Roles to which the role will be immediately added as a new member | |
$members | (array) Roles which are automatically added as members of the role | |
$adminmembers | (array) Roles which are automatically added as admin members of the role | |
$memberofold | (array) Original roles whose the role belongs to | |
$membersold | (array) Original roles that are members of the role | |
$adminmembersold | (array) Original roles that are admin members of the role | |
$newrolename | The new name of the role | |
Résultat | -3 |
public setRenameUser ( $username, $password, $createdb, $createuser, $expiry, $newname ) : -3 | ||
$username | The username of the user to modify | |
$password | A new password for the user | |
$createdb | boolean Whether or not the user can create databases | |
$createuser | boolean Whether or not the user can create other users | |
$expiry | string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. | |
$newname | The new name of the user | |
Résultat | -3 |
public setRole ( $rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold ) | ||
$rolename | The name of the role to adjust | |
$password | A password for the role | |
$superuser | Boolean whether or not the role is a superuser | |
$createdb | Boolean whether or not the role can create databases | |
$createrole | Boolean whether or not the role can create other roles | |
$inherits | Boolean whether or not the role inherits the privileges from parent roles | |
$login | Boolean whether or not the role will be allowed to login | |
$connlimit | Number of concurrent connections the role can make | |
$expiry | string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire | |
$memberof | (array) Roles to which the role will be immediately added as a new member | |
$members | (array) Roles which are automatically added as members of the role | |
$adminmembers | (array) Roles which are automatically added as admin members of the role | |
$memberofold | (array) Original roles whose the role belongs to | |
$membersold | (array) Original roles that are members of the role | |
$adminmembersold | (array) Original roles that are admin members of the role |
public setRule ( $name, $event, $table, $where, $instead, $type, $action ) : -1 | ||
$name | The name of the new rule | |
$event | SELECT, INSERT, UPDATE or DELETE | |
$table | Table on which to create the rule | |
$where | When to execute the rule, '' indicates always | |
$instead | True if an INSTEAD rule, false otherwise | |
$type | NOTHING for a do nothing rule, SOMETHING to use given action | |
$action | The action to take | |
Résultat | -1 |
public setSchema ( $schema ) | ||
$schema | The the name of the schema to work in |
public setSearchPath ( $paths ) : -2 | ||
$paths | An array of schemas in required search order | |
Résultat | -2 |
public setUser ( $username, $password, $createdb, $createuser, $expiry ) | ||
$username | The username of the user to modify | |
$password | A new password for the user | |
$createdb | boolean Whether or not the user can create databases | |
$createuser | boolean Whether or not the user can create other users | |
$expiry | string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. |
public setView ( $viewname, $definition, $comment ) : -3 | ||
$viewname | The name fo the view to update | |
$definition | The new definition for the view | |
Résultat | -3 |
public setvalSequence ( $sequence, $nextvalue ) : -1 | ||
$sequence | Sequence name | |
$nextvalue | The next value | |
Résultat | -1 |
public updateFtsConfiguration ( $cfgname, $comment, $name ) | ||
$cfgname | The conf's name | |
$comment | A comment on for the conf | |
$name | The new conf name |
public updateFtsDictionary ( $dictname, $comment, $name ) | ||
$dictname | The dico's name | |
$comment | The comment | |
$name | The new dico's name |
public updateSchema ( $schemaname, $comment, $name, $owner ) | ||
$schemaname | The name of the schema to drop | |
$comment | The new comment for this schema | |
$owner | The new owner for this schema |
public vacuumDB ( $table = '', $analyze = false, $full = false, $freeze = false ) | ||
$table | The table to vacuum | |
$analyze | If true, also does analyze | |
$full | If true, selects "full" vacuum | |
$freeze | If true, selects aggressive "freezing" of tuples |
public $codemap |
public $extraTypes |
public $fkactions |
public $langmap |