diff options
author | ffflabs <amenadiel@gmail.com> | 2020-02-25 23:03:19 +0300 |
---|---|---|
committer | ffflabs <amenadiel@gmail.com> | 2020-02-25 23:03:19 +0300 |
commit | 3be2c9adcd0ac0e0c3a23c94279e488968368ebc (patch) | |
tree | 413cad5c8ce6e56772dbdad72126c0aa35d7de6e | |
parent | 9a1b4da61b6e999b2aeeaa0cc1a3267bc35b720c (diff) |
DB functions may return int instead of recordset
32 files changed, 210 insertions, 201 deletions
diff --git a/src/database/Postgres.php b/src/database/Postgres.php index cd856b0c..89b73d59 100644 --- a/src/database/Postgres.php +++ b/src/database/Postgres.php @@ -179,7 +179,7 @@ class Postgres extends ADOdbBase * @param string $term The search term * @param string $filter The object type to restrict to ('' means no restriction) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function findObject($term, $filter) { @@ -376,7 +376,7 @@ class Postgres extends ADOdbBase * * @param bool $all True to get all languages, regardless of show_system * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getLanguages($all = false) { diff --git a/src/database/Postgres10.php b/src/database/Postgres10.php index 800a586f..9b6a0b54 100644 --- a/src/database/Postgres10.php +++ b/src/database/Postgres10.php @@ -25,7 +25,7 @@ class Postgres10 extends Postgres96 /** * Return all tables in current database (and schema). * - * @return \PHPPgAdmin\ADORecordSet All tables, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int All tables, sorted alphabetically */ public function getTables() { diff --git a/src/database/Postgres11.php b/src/database/Postgres11.php index cbab1aa3..4e3e418f 100644 --- a/src/database/Postgres11.php +++ b/src/database/Postgres11.php @@ -26,7 +26,7 @@ class Postgres11 extends Postgres10 * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If truthy, will return functions of type trigger * - * @return \PHPPgAdmin\ADORecordSet All functions + * @return \PHPPgAdmin\ADORecordSet|int All functions */ public function getFunctions($all = false, $type = null) { diff --git a/src/database/Postgres74.php b/src/database/Postgres74.php index 648b00be..eeb50ab5 100644 --- a/src/database/Postgres74.php +++ b/src/database/Postgres74.php @@ -63,7 +63,7 @@ class Postgres74 extends Postgres80 * * @param null|string $currentdatabase * - * @return \PHPPgAdmin\ADORecordSet A list of databases, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int A list of databases, sorted alphabetically */ public function getDatabases($currentdatabase = null) { @@ -110,7 +110,7 @@ class Postgres74 extends Postgres80 * @param string $term The search term * @param string $filter The object type to restrict to ('' means no restriction) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function findObject($term, $filter) { @@ -257,7 +257,7 @@ class Postgres74 extends Postgres80 /** * Returns table locks information in the current database. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getLocks() { @@ -383,7 +383,7 @@ class Postgres74 extends Postgres80 * * @param string $table The name of the table * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTable($table) { @@ -424,7 +424,7 @@ class Postgres74 extends Postgres80 * * @param string $table the table where we are looking for fk * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getConstraintsWithFields($table) { @@ -489,7 +489,7 @@ class Postgres74 extends Postgres80 * * @param bool $all * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getSequences($all = false) { @@ -520,7 +520,7 @@ class Postgres74 extends Postgres80 * * @param int $function_oid function identifier * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int Function info * * @internal param string The $func name of the function to retrieve */ @@ -560,7 +560,7 @@ class Postgres74 extends Postgres80 /** * Returns a list of all casts in the database. * - * @return \PHPPgAdmin\ADORecordSet All casts + * @return \PHPPgAdmin\ADORecordSet|int All casts */ public function getCasts() { diff --git a/src/database/Postgres80.php b/src/database/Postgres80.php index 2914765c..4a0ce5b1 100644 --- a/src/database/Postgres80.php +++ b/src/database/Postgres80.php @@ -57,7 +57,7 @@ class Postgres80 extends Postgres81 * * @param null|string $currentdatabase * - * @return \PHPPgAdmin\ADORecordSet A list of databases, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int A list of databases, sorted alphabetically */ public function getDatabases($currentdatabase = null) { @@ -104,7 +104,7 @@ class Postgres80 extends Postgres81 /** * Return all schemas in the current database. * - * @return \PHPPgAdmin\ADORecordSet All schemas, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int All schemas, sorted alphabetically */ public function getSchemas() { @@ -132,7 +132,7 @@ class Postgres80 extends Postgres81 * * @param string $schema The name of the schema * - * @return \PHPPgAdmin\ADORecordSet Schema information + * @return \PHPPgAdmin\ADORecordSet|int Schema information */ public function getSchemaByName($schema) { @@ -155,7 +155,7 @@ class Postgres80 extends Postgres81 * @param string $username The username * @param string $password The new password * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int 0 if operation was successful */ public function changePassword($username, $password) { @@ -176,7 +176,7 @@ class Postgres80 extends Postgres81 * @param string $name The name of the aggregate * @param string $basetype The input data type of the aggregate * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getAggregate($name, $basetype) { @@ -431,7 +431,7 @@ class Postgres80 extends Postgres81 /** * Return all tables in current database (and schema). * - * @return \PHPPgAdmin\ADORecordSet All tables, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int All tables, sorted alphabetically */ public function getTables() { diff --git a/src/database/Postgres81.php b/src/database/Postgres81.php index 7305200b..578b9231 100644 --- a/src/database/Postgres81.php +++ b/src/database/Postgres81.php @@ -54,7 +54,7 @@ class Postgres81 extends Postgres82 * * @param null|string $currentdatabase * - * @return \PHPPgAdmin\ADORecordSet A list of databases, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int A list of databases, sorted alphabetically */ public function getDatabases($currentdatabase = null) { @@ -144,6 +144,9 @@ class Postgres81 extends Postgres82 // Autovacuum functions + /** + * @return \PHPPgAdmin\ADORecordSet|int + */ public function saveAutovacuum( $table, $vacenabled, @@ -250,7 +253,7 @@ class Postgres81 extends Postgres82 * * @param null|string $database (optional) Find only connections to specified database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getProcesses($database = null) { @@ -278,7 +281,7 @@ class Postgres81 extends Postgres82 * * @param string $spcname namespace * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespace($spcname) { @@ -295,7 +298,7 @@ class Postgres81 extends Postgres82 * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespaces($all = false) { diff --git a/src/database/Postgres82.php b/src/database/Postgres82.php index cbaa715c..b5262841 100644 --- a/src/database/Postgres82.php +++ b/src/database/Postgres82.php @@ -51,7 +51,7 @@ class Postgres82 extends Postgres83 /** * Returns table locks information in the current database. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getLocks() { @@ -79,7 +79,7 @@ class Postgres82 extends Postgres83 * @param \PHPPgAdmin\ADORecordSet $seqrs The sequence RecordSet returned by getSequence() * @param string $name The new name for the sequence * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int 0 if operation was successful */ public function alterSequenceName($seqrs, $name) { @@ -107,7 +107,7 @@ class Postgres82 extends Postgres83 * @param \PHPPgAdmin\ADORecordSet $vwrs The view recordSet returned by getView() * @param string $name The new view's name * - * @return int -1 if Failed + * @return \PHPPgAdmin\ADORecordSet|int -1 if Failed */ public function alterViewName($vwrs, $name) { @@ -135,7 +135,7 @@ class Postgres82 extends Postgres83 * * @param string $table The name of a table whose triggers to retrieve * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTriggers($table = '') { @@ -167,7 +167,7 @@ class Postgres82 extends Postgres83 * * @param int $function_oid * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int Function info * * @internal param string The $func name of the function to retrieve */ @@ -338,7 +338,7 @@ class Postgres82 extends Postgres83 * * @param int $operator_oid The oid of the operator * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int Function info */ public function getOperator($operator_oid) { @@ -374,7 +374,7 @@ class Postgres82 extends Postgres83 /** * Gets all opclasses. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getOpClasses() { diff --git a/src/database/Postgres83.php b/src/database/Postgres83.php index 5d15c2d0..6897e81c 100644 --- a/src/database/Postgres83.php +++ b/src/database/Postgres83.php @@ -103,7 +103,7 @@ class Postgres83 extends Postgres84 * * @param string $table * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTableAutovacuum($table = '') { @@ -149,6 +149,9 @@ class Postgres83 extends Postgres84 return $this->selectSet($sql); } + /** + * @return \PHPPgAdmin\ADORecordSet|int + */ public function saveAutovacuum( $table, $vacenabled, @@ -264,6 +267,9 @@ class Postgres83 extends Postgres84 return $status; } + /** + * @return bool|int + */ public function dropAutovacuum($table) { $c_schema = $this->_schema; @@ -295,7 +301,7 @@ class Postgres83 extends Postgres84 * @param bool $cycledvalue Sequence can cycle ? * @param int $startvalue The sequence start value when issueing a restart (ignored) * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int 0 if operation was successful */ public function alterSequenceProps( $seqrs, @@ -351,7 +357,7 @@ class Postgres83 extends Postgres84 * @param \PHPPgAdmin\ADORecordSet $seqrs The sequence RecordSet returned by getSequence() * @param string $owner sequence owner * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int 0 if operation was successful * * @internal param string The $name new owner for the sequence */ @@ -379,7 +385,7 @@ class Postgres83 extends Postgres84 * * @param $function_oid * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int Function info * * @internal param string $func name of the function to retrieve */ diff --git a/src/database/Postgres84.php b/src/database/Postgres84.php index dd1bcc16..6aa5ee9c 100644 --- a/src/database/Postgres84.php +++ b/src/database/Postgres84.php @@ -39,7 +39,7 @@ class Postgres84 extends Postgres90 * * @param string $table The name of a table whose triggers to retrieve * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTriggers($table = '') { @@ -71,7 +71,7 @@ class Postgres84 extends Postgres90 * @param string $term The search term * @param string $filter The object type to restrict to ('' means no restriction) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function findObject($term, $filter) { diff --git a/src/database/Postgres91.php b/src/database/Postgres91.php index 12ff33a0..78147929 100644 --- a/src/database/Postgres91.php +++ b/src/database/Postgres91.php @@ -27,7 +27,7 @@ class Postgres91 extends Postgres92 * * @param null|string $database (optional) Find only connections to specified database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getProcesses($database = null) { @@ -53,7 +53,7 @@ class Postgres91 extends Postgres92 * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespaces($all = false) { @@ -77,7 +77,7 @@ class Postgres91 extends Postgres92 * * @param string $spcname * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespace($spcname) { diff --git a/src/database/Postgres92.php b/src/database/Postgres92.php index e9e9b826..fa2879e7 100644 --- a/src/database/Postgres92.php +++ b/src/database/Postgres92.php @@ -20,7 +20,7 @@ class Postgres92 extends Postgres93 * * @param null|string $database (optional) Find only connections to specified database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getProcesses($database = null) { @@ -46,7 +46,7 @@ class Postgres92 extends Postgres93 * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespaces($all = false) { @@ -72,7 +72,7 @@ class Postgres92 extends Postgres93 * * @param $spcname * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getTablespace($spcname) { diff --git a/src/database/Postgres93.php b/src/database/Postgres93.php index a0f6bec7..89b8faa1 100644 --- a/src/database/Postgres93.php +++ b/src/database/Postgres93.php @@ -20,7 +20,7 @@ class Postgres93 extends Postgres94 * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If not null, will find all trigger functions * - * @return \PHPPgAdmin\ADORecordSet All functions + * @return \PHPPgAdmin\ADORecordSet|int All functions */ public function getFunctions($all = false, $type = null) { diff --git a/src/database/Postgres96.php b/src/database/Postgres96.php index 9481d3bf..1b126997 100644 --- a/src/database/Postgres96.php +++ b/src/database/Postgres96.php @@ -22,7 +22,7 @@ class Postgres96 extends Postgres * * @param null|string $database (optional) Find only connections to specified database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int A recordset */ public function getProcesses($database = null) { @@ -66,7 +66,7 @@ class Postgres96 extends Postgres * @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire * @param array $groups The groups to create the user in * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int 0 if operation was successful * * @internal param $group (array) The groups to create the user in */ diff --git a/src/database/databasetraits/AggregateTrait.php b/src/database/databasetraits/AggregateTrait.php index 66cf2938..e11b8719 100644 --- a/src/database/databasetraits/AggregateTrait.php +++ b/src/database/databasetraits/AggregateTrait.php @@ -80,7 +80,7 @@ trait AggregateTrait * @param string $aggrtype The input data type of the aggregate * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropAggregate($aggrname, $aggrtype, $cascade) { @@ -103,7 +103,7 @@ trait AggregateTrait * @param string $name The name of the aggregate * @param string $basetype The input data type of the aggregate * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getAggregate($name, $basetype) { @@ -133,7 +133,7 @@ trait AggregateTrait /** * Gets all aggregates. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getAggregates() { @@ -236,7 +236,7 @@ trait AggregateTrait * @param string $aggrtype The input data type of the aggregate * @param string $newaggrowner The new owner of the aggregate * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function changeAggregateOwner($aggrname, $aggrtype, $newaggrowner) { @@ -256,7 +256,7 @@ trait AggregateTrait * @param string $aggrtype The input data type of the aggregate * @param string $newaggrschema The new schema for the aggregate * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function changeAggregateSchema($aggrname, $aggrtype, $newaggrschema) { @@ -277,7 +277,7 @@ trait AggregateTrait * @param string $aggrtype The actual input data type of the aggregate * @param string $newaggrname The new name of the aggregate * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function renameAggregate($aggrschema, $aggrname, $aggrtype, $newaggrname) { diff --git a/src/database/databasetraits/ColumnTrait.php b/src/database/databasetraits/ColumnTrait.php index 38c1e32e..b35e0ff2 100644 --- a/src/database/databasetraits/ColumnTrait.php +++ b/src/database/databasetraits/ColumnTrait.php @@ -261,7 +261,7 @@ trait ColumnTrait * @param string $column The column name to set * @param mixed $default The new default value * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setColumnDefault($table, $column, $default) { @@ -282,7 +282,7 @@ trait ColumnTrait * @param string $column The column to alter * @param bool $state True to set null, false to set not null * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setColumnNull($table, $column, $state) { @@ -328,7 +328,7 @@ trait ColumnTrait * @param string $table The table from which to drop * @param string $column The column name to drop default * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropColumnDefault($table, $column) { diff --git a/src/database/databasetraits/DatabaseTrait.php b/src/database/databasetraits/DatabaseTrait.php index 51102b66..80ea264f 100644 --- a/src/database/databasetraits/DatabaseTrait.php +++ b/src/database/databasetraits/DatabaseTrait.php @@ -14,7 +14,7 @@ trait DatabaseTrait /** * Returns the current default_with_oids setting. * - * @return string default_with_oids setting + * @return int|string */ public function getDefaultWithOid() { @@ -56,7 +56,7 @@ trait DatabaseTrait * * @param string $table (optional) The table to analyze * - * @return bool 0 if successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function analyzeDB($table = '') { @@ -78,7 +78,7 @@ trait DatabaseTrait * * @param string $database The name of the database to retrieve * - * @return \PHPPgAdmin\ADORecordSet The database info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDatabase($database) { @@ -93,7 +93,7 @@ trait DatabaseTrait * * @param null|string $currentdatabase database name that should be on top of the resultset * - * @return \PHPPgAdmin\ADORecordSet A list of databases, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDatabases($currentdatabase = null) { @@ -161,7 +161,7 @@ trait DatabaseTrait * * @param string $database the name of the database to get the comment for * - * @return \PHPPgAdmin\ADORecordSet recordset of the db comment info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDatabaseComment($database) { @@ -180,7 +180,7 @@ trait DatabaseTrait * * @param string $database the name of the database to get the owner for * - * @return \PHPPgAdmin\ADORecordSet recordset of the db owner info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDatabaseOwner($database) { @@ -271,7 +271,7 @@ trait DatabaseTrait * * @param string $database The name of the database to drop * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropDatabase($database) { @@ -338,7 +338,7 @@ trait DatabaseTrait * @param string $oldName name of database to rename * @param string $newName new name of database * - * @return int 0 on success + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterDatabaseRename($oldName, $newName) { @@ -361,7 +361,7 @@ trait DatabaseTrait * @param string $dbName database to change ownership of * @param string $newOwner user that will own the database * - * @return int 0 on success + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterDatabaseOwner($dbName, $newOwner) { @@ -378,7 +378,7 @@ trait DatabaseTrait * * @param null|string $database (optional) Find only prepared transactions executed in a specific database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getPreparedXacts($database = null) { @@ -398,7 +398,7 @@ trait DatabaseTrait * * @param null|string $database (optional) Find only connections to specified database * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getProcesses($database = null) { @@ -424,7 +424,7 @@ trait DatabaseTrait /** * Returns table locks information in the current database. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getLocks() { @@ -560,7 +560,7 @@ trait DatabaseTrait /** * Returns all available variable information. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getVariables() { diff --git a/src/database/databasetraits/DomainTrait.php b/src/database/databasetraits/DomainTrait.php index e5d9bab3..9d600e70 100644 --- a/src/database/databasetraits/DomainTrait.php +++ b/src/database/databasetraits/DomainTrait.php @@ -16,7 +16,7 @@ trait DomainTrait * * @param string $domain The name of the domain to fetch * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDomain($domain) { @@ -46,7 +46,7 @@ trait DomainTrait /** * Return all domains in current schema. Excludes domain constraints. * - * @return \PHPPgAdmin\ADORecordSet All tables, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDomains() { @@ -77,7 +77,7 @@ trait DomainTrait * * @param string $domain The name of the domain whose constraints to fetch * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getDomainConstraints($domain) { @@ -116,7 +116,7 @@ trait DomainTrait * @param string $default Default value for domain * @param string $check A CHECK constraint if there is one * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createDomain($domain, $type, $length, $array, $notnull, $default, $check) { @@ -240,7 +240,7 @@ trait DomainTrait * @param string $domain The name of the domain to drop * @param string $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropDomain($domain, $cascade) { @@ -263,7 +263,7 @@ trait DomainTrait * @param string $definition The definition of the check * @param string $name (optional) The name to give the check, otherwise default name is assigned * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function addDomainCheckConstraint($domain, $definition, $name = '') { @@ -289,7 +289,7 @@ trait DomainTrait * @param string $constraint The constraint to remove * @param bool $cascade True to cascade, false otherwise * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropDomainConstraint($domain, $constraint, $cascade) { diff --git a/src/database/databasetraits/FtsTrait.php b/src/database/databasetraits/FtsTrait.php index e46386cd..992b177d 100644 --- a/src/database/databasetraits/FtsTrait.php +++ b/src/database/databasetraits/FtsTrait.php @@ -82,7 +82,7 @@ trait FtsTrait * * @param bool $all if false, returns schema qualified FTS confs * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsConfigurations($all = true) { @@ -116,7 +116,7 @@ trait FtsTrait * * @param string $ftscfg Name of the FTS configuration * - * @return \PHPPgAdmin\ADORecordSet recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsConfigurationMap($ftscfg) { @@ -156,7 +156,7 @@ trait FtsTrait * * @param bool $all if false, return only Parsers from the current schema * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsParsers($all = true) { @@ -185,7 +185,7 @@ trait FtsTrait * * @param bool $all if false, return only Dics from the current schema * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsDictionaries($all = true) { @@ -211,7 +211,7 @@ trait FtsTrait /** * Returns all FTS dictionary templates available. * - * @return \PHPPgAdmin\ADORecordSet all FTS dictionary templates available + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsDictionaryTemplates() { @@ -242,7 +242,7 @@ trait FtsTrait * @param string $ftscfg The configuration's name * @param bool $cascade true to Cascade to dependenced objects * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropFtsConfiguration($ftscfg, $cascade) { @@ -264,7 +264,7 @@ trait FtsTrait * @param string $ftsdict The dico's name * @param bool $cascade Cascade to dependenced objects * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @todo Support of dictionary templates dropping */ @@ -469,7 +469,7 @@ trait FtsTrait * * @param string $ftsdict The name of the FTS dictionary * - * @return \PHPPgAdmin\ADORecordSet recordset of FTS dictionary information + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsDictionaryByName($ftsdict) { @@ -504,7 +504,7 @@ trait FtsTrait * @param string $action What to do with the mapping: add, alter or drop * @param string $dictname Dictionary that will process tokens given or null in case of drop action * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param string $cfgname The name of the FTS configuration to alter */ @@ -550,7 +550,7 @@ trait FtsTrait * @param string $ftscfg The name of the FTS configuration * @param string $mapping The name of the mapping * - * @return \PHPPgAdmin\ADORecordSet FTS configuration information + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsMappingByName($ftscfg, $mapping) { @@ -590,7 +590,7 @@ trait FtsTrait * * @param string $ftscfg The config's name that use the parser * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsMappings($ftscfg) { @@ -608,7 +608,7 @@ trait FtsTrait * * @param string $ftscfg The name of the FTS configuration * - * @return \PHPPgAdmin\ADORecordSet FTS configuration information + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFtsConfigurationByName($ftscfg) { diff --git a/src/database/databasetraits/FunctionTrait.php b/src/database/databasetraits/FunctionTrait.php index 5c24b289..e8dc715f 100644 --- a/src/database/databasetraits/FunctionTrait.php +++ b/src/database/databasetraits/FunctionTrait.php @@ -17,7 +17,7 @@ trait FunctionTrait * @param bool $all If true, will find all available functions, if false just those in search path * @param mixed $type If truthy, will return functions of type trigger * - * @return \PHPPgAdmin\ADORecordSet All functions + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFunctions($all = false, $type = null) { @@ -328,7 +328,7 @@ trait FunctionTrait * @param int $function_oid The OID of the function to drop * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropFunction($function_oid, $cascade) { @@ -351,7 +351,7 @@ trait FunctionTrait * * @param int $function_oid * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param string The $func name of the function to retrieve */ @@ -390,7 +390,7 @@ trait FunctionTrait * * @param int $function_oid * - * @return \PHPPgAdmin\ADORecordSet Function definition + * @return \PHPPgAdmin\ADORecordSet|int */ public function getFunctionDef($function_oid) { diff --git a/src/database/databasetraits/IndexTrait.php b/src/database/databasetraits/IndexTrait.php index dc2080b1..6c9cae4c 100644 --- a/src/database/databasetraits/IndexTrait.php +++ b/src/database/databasetraits/IndexTrait.php @@ -125,7 +125,7 @@ trait IndexTrait * @param bool $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 * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function reindex($type, $name, $force = false) { @@ -194,7 +194,7 @@ trait IndexTrait * * @param string $table the table where we are looking for fk * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getConstraintsWithFields($table) { @@ -260,7 +260,7 @@ trait IndexTrait * @param string $name (optional) The name to give the key, otherwise default name is assigned * @param string $tablespace (optional) The tablespace for the schema, '' indicates default * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function addPrimaryKey($table, $fields, $name = '', $tablespace = '') { @@ -297,7 +297,7 @@ trait IndexTrait * @param string $name (optional) The name to give the key, otherwise default name is assigned * @param string $tablespace (optional) The tablespace for the schema, '' indicates default * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function addUniqueKey($table, $fields, $name = '', $tablespace = '') { @@ -335,7 +335,7 @@ trait IndexTrait * @param string $definition The definition of the check * @param string $name (optional) The name to give the check, otherwise default name is assigned * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function addCheckConstraint($table, $definition, $name = '') { @@ -432,7 +432,7 @@ trait IndexTrait * @param string $initially The initially parameter for the FK (eg. INITIALLY IMMEDIATE) * @param string $name [optional] The name to give the key, otherwise default name is assigned * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param \PHPPgAdmin\Database\The $target table that contains the target columns * @internal param \PHPPgAdmin\Database\The $intially initial deferrability (eg. INITIALLY IMMEDIATE) @@ -503,7 +503,7 @@ trait IndexTrait * @param string $type The type of constraint (c, f, u or p) * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropConstraint($constraint, $relation, $type, $cascade) { diff --git a/src/database/databasetraits/OperatorTrait.php b/src/database/databasetraits/OperatorTrait.php index 3f6aec38..c7325c8d 100644 --- a/src/database/databasetraits/OperatorTrait.php +++ b/src/database/databasetraits/OperatorTrait.php @@ -14,7 +14,7 @@ trait OperatorTrait /** * Returns a list of all operators in the database. * - * @return \PHPPgAdmin\ADORecordSet All operators + * @return \PHPPgAdmin\ADORecordSet|int */ public function getOperators() { @@ -45,7 +45,7 @@ trait OperatorTrait * @param mixed $operator_oid The OID of the operator to drop * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropOperator($operator_oid, $cascade) { @@ -81,7 +81,7 @@ trait OperatorTrait * * @param mixed $operator_oid The oid of the operator * - * @return \PHPPgAdmin\ADORecordSet Function info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getOperator($operator_oid) { @@ -110,9 +110,9 @@ trait OperatorTrait } /** - * Gets all opclasses. + * Gets all opclasses. * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getOpClasses() { diff --git a/src/database/databasetraits/PrivilegesTrait.php b/src/database/databasetraits/PrivilegesTrait.php index 8d496b91..5a0c5970 100644 --- a/src/database/databasetraits/PrivilegesTrait.php +++ b/src/database/databasetraits/PrivilegesTrait.php @@ -240,7 +240,7 @@ trait PrivilegesTrait * @param bool $cascade True for cascade revoke, false otherwise * @param string $table the column's table if type=column * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setPrivileges( $mode, diff --git a/src/database/databasetraits/RoleTrait.php b/src/database/databasetraits/RoleTrait.php index c4cbac00..cde8a129 100644 --- a/src/database/databasetraits/RoleTrait.php +++ b/src/database/databasetraits/RoleTrait.php @@ -16,7 +16,7 @@ trait RoleTrait * * @param string $rolename (optional) The role name to exclude from the select * - * @return \PHPPgAdmin\ADORecordSet Either one or All roles + * @return \PHPPgAdmin\ADORecordSet|int */ public function getRoles($rolename = '') { @@ -50,7 +50,7 @@ trait RoleTrait * * @param string $rolename The name of the role to retrieve * - * @return \PHPPgAdmin\ADORecordSet The role's data + * @return \PHPPgAdmin\ADORecordSet|int */ public function getRole($rolename) { @@ -79,7 +79,7 @@ trait RoleTrait /** * Returns all users in the database cluster. * - * @return \PHPPgAdmin\ADORecordSet All users + * @return \PHPPgAdmin\ADORecordSet|int */ public function getUsers() { @@ -101,7 +101,7 @@ trait RoleTrait * * @param string $username The username of the user to retrieve * - * @return \PHPPgAdmin\ADORecordSet The user's data + * @return \PHPPgAdmin\ADORecordSet|int */ public function getUser($username) { @@ -137,7 +137,7 @@ trait RoleTrait * @param array $new_members_of_role (array) Roles which are automatically added as members of the new role * @param array $new_admins_of_role (array) Roles which are automatically added as admin members of the new role * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createRole( $rolename, @@ -299,7 +299,7 @@ trait RoleTrait * @param string $rolename The name of the role to rename * @param string $newrolename The new name of the role * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function renameRole($rolename, $newrolename) { @@ -504,7 +504,7 @@ trait RoleTrait * @param string $rolename The name of the role that will belong to the target role * @param int $admin (optional) Flag to grant the admin option * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function grantRole($role, $rolename, $admin = 0) { @@ -527,7 +527,7 @@ trait RoleTrait * @param int $admin (optional) Flag to revoke only the admin option * @param string $type (optional) Type of revoke: RESTRICT | CASCADE * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function revokeRole($role, $rolename, $admin = 0, $type = 'RESTRICT') { @@ -549,7 +549,7 @@ trait RoleTrait * * @param string $rolename The name of the role to drop * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropRole($rolename) { @@ -570,7 +570,7 @@ trait RoleTrait * @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire * @param array $groups The groups to create the user in * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param $group (array) The groups to create the user in */ @@ -647,7 +647,7 @@ trait RoleTrait * @param string $username The username of the user to rename * @param string $newname The new name of the user * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function renameUser($username, $newname) { @@ -670,7 +670,7 @@ trait RoleTrait * @param bool $createuser boolean Whether or not the user can create other users * @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setUser($username, $password, $createdb, $createuser, $expiry) { @@ -700,7 +700,7 @@ trait RoleTrait * * @param string $username The username of the user to drop * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropUser($username) { @@ -717,7 +717,7 @@ trait RoleTrait * @param string $rolename The role name * @param string $password The new password * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function changePassword($rolename, $password) { @@ -736,7 +736,7 @@ trait RoleTrait * @param string $groname The name of the group * @param string $user The name of the user to add to the group * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function addGroupMember($groname, $user) { @@ -753,7 +753,7 @@ trait RoleTrait * * @param string $rolename The role name * - * @return \PHPPgAdmin\ADORecordSet All role names + * @return \PHPPgAdmin\ADORecordSet|int */ public function getMemberOf($rolename) { @@ -778,7 +778,7 @@ trait RoleTrait * @param string $rolename The role name * @param string $admin (optional) Find only admin members * - * @return \PHPPgAdmin\ADORecordSet All role names + * @return \PHPPgAdmin\ADORecordSet|int */ public function getMembers($rolename, $admin = 'f') { @@ -800,7 +800,7 @@ trait RoleTrait * @param string $groname The name of the group * @param string $user The name of the user to remove from the group * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropGroupMember($groname, $user) { @@ -817,7 +817,7 @@ trait RoleTrait * * @param string $groname The name of the group * - * @return \PHPPgAdmin\ADORecordSet All users in the group + * @return \PHPPgAdmin\ADORecordSet|int */ public function getGroup($groname) { @@ -834,7 +834,7 @@ trait RoleTrait /** * Returns all groups in the database cluser. * - * @return \PHPPgAdmin\ADORecordSet All groups + * @return \PHPPgAdmin\ADORecordSet|int */ public function getGroups() { @@ -849,7 +849,7 @@ trait RoleTrait * @param string $groname The name of the group * @param array $users An array of users to add to the group * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createGroup($groname, $users) { @@ -870,7 +870,7 @@ trait RoleTrait * * @param string $groname The name of the group to drop * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropGroup($groname) { diff --git a/src/database/databasetraits/RowTrait.php b/src/database/databasetraits/RowTrait.php index b1c13d61..b0873b51 100644 --- a/src/database/databasetraits/RowTrait.php +++ b/src/database/databasetraits/RowTrait.php @@ -17,7 +17,7 @@ trait RowTrait * @param string $table The name of a table * @param array $key The associative array holding the key to retrieve * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function browseRow($table, $key) { @@ -107,7 +107,7 @@ trait RowTrait * @param array $format An array of the data type (VALUE or EXPRESSION) * @param array $types An array of field types * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function insertRow($table, $fields, $values, $nulls, $format, $types) { diff --git a/src/database/databasetraits/SchemaTrait.php b/src/database/databasetraits/SchemaTrait.php index 1f50a0fd..f055aaa5 100644 --- a/src/database/databasetraits/SchemaTrait.php +++ b/src/database/databasetraits/SchemaTrait.php @@ -16,7 +16,7 @@ trait SchemaTrait /** * Return all schemas in the current database. * - * @return \PHPPgAdmin\ADORecordSet All schemas, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int */ public function getSchemas() { @@ -99,7 +99,7 @@ trait SchemaTrait * * @param mixed $paths An array of schemas in required search order * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setSearchPath($paths) { @@ -239,7 +239,7 @@ trait SchemaTrait * * @param string $schema The name of the schema * - * @return \PHPPgAdmin\ADORecordSet Schema information + * @return \PHPPgAdmin\ADORecordSet|int */ public function getSchemaByName($schema) { @@ -262,7 +262,7 @@ trait SchemaTrait * @param string $schemaname The name of the schema to drop * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropSchema($schemaname, $cascade) { diff --git a/src/database/databasetraits/SequenceTrait.php b/src/database/databasetraits/SequenceTrait.php index 0bcfdea9..2a33a4fe 100644 --- a/src/database/databasetraits/SequenceTrait.php +++ b/src/database/databasetraits/SequenceTrait.php @@ -16,7 +16,7 @@ trait SequenceTrait * * @param bool $all true to get all sequences of all schemas * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getSequences($all = false) { @@ -46,7 +46,7 @@ trait SequenceTrait * * @param string $sequence Sequence name * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function nextvalSequence($sequence) { @@ -68,7 +68,7 @@ trait SequenceTrait * @param string $sequence Sequence name * @param number $nextvalue The next value * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function setvalSequence($sequence, $nextvalue) { @@ -90,7 +90,7 @@ trait SequenceTrait * * @param string $sequence Sequence name * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function restartSequence($sequence) { @@ -108,7 +108,7 @@ trait SequenceTrait * * @param string $sequence Sequence name * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function resetSequence($sequence) { @@ -136,7 +136,7 @@ trait SequenceTrait * * @param string $sequence Sequence name * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getSequence($sequence) { @@ -169,7 +169,7 @@ trait SequenceTrait * @param number $cachevalue The cache value * @param bool $cycledvalue True if cycled, false otherwise * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createSequence( $sequence, @@ -383,7 +383,7 @@ trait SequenceTrait * @param \PHPPgAdmin\ADORecordSet $seqrs The sequence RecordSet returned by getSequence() * @param string $owner the new owner of the sequence * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal string $name new owner for the sequence */ @@ -416,7 +416,7 @@ trait SequenceTrait * @param null|bool $cycledvalue Sequence can cycle ? * @param number $startvalue The sequence start value when issueing a restart * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterSequenceProps( $seqrs, @@ -476,7 +476,7 @@ trait SequenceTrait * @param \PHPPgAdmin\ADORecordSet $seqrs The sequence RecordSet returned by getSequence() * @param string $name The new name for the sequence * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterSequenceName($seqrs, $name) { @@ -502,7 +502,7 @@ trait SequenceTrait * @param \PHPPgAdmin\ADORecordSet $seqrs The sequence RecordSet returned by getSequence() * @param string $schema * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param The $name new schema for the sequence */ @@ -526,7 +526,7 @@ trait SequenceTrait * @param $sequence Sequence name * @param $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropSequence($sequence, $cascade) { diff --git a/src/database/databasetraits/StatsTrait.php b/src/database/databasetraits/StatsTrait.php index c50cafae..6460d4af 100644 --- a/src/database/databasetraits/StatsTrait.php +++ b/src/database/databasetraits/StatsTrait.php @@ -16,7 +16,7 @@ trait StatsTrait * * @param string $database The database to fetch stats for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getStatsDatabase($database) { @@ -32,7 +32,7 @@ trait StatsTrait * * @param string $table The table to fetch stats for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getStatsTableTuples($table) { @@ -51,7 +51,7 @@ trait StatsTrait * * @param string $table The table to fetch stats for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getStatsTableIO($table) { @@ -70,7 +70,7 @@ trait StatsTrait * * @param string $table The table to fetch index stats for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getStatsIndexTuples($table) { @@ -89,7 +89,7 @@ trait StatsTrait * * @param string $table The table to fetch index stats for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getStatsIndexIO($table) { diff --git a/src/database/databasetraits/TableTrait.php b/src/database/databasetraits/TableTrait.php index f103c2e5..97e4bd31 100644 --- a/src/database/databasetraits/TableTrait.php +++ b/src/database/databasetraits/TableTrait.php @@ -18,7 +18,7 @@ trait TableTrait /** * Return all tables in current database excluding schemas 'pg_catalog', 'information_schema' and 'pg_toast'. * - * @return \PHPPgAdmin\ADORecordSet All tables, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int */ public function getAllTables() { @@ -36,7 +36,7 @@ trait TableTrait /** * Return all tables in current database (and schema). * - * @return \PHPPgAdmin\ADORecordSet All tables, sorted alphabetically + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTables() { @@ -75,7 +75,7 @@ trait TableTrait * * @param string $table The table to find the parents for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTableParents($table) { @@ -105,7 +105,7 @@ trait TableTrait * * @param string $table The table to find the children for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTableChildren($table) { @@ -135,9 +135,9 @@ trait TableTrait * @param string $table The table to define * @param string $cleanprefix set to '-- ' to avoid issuing DROP statement * - * @return string A string containing the formatted SQL code + * @return null|string */ - public function getTableDefPrefix($table, $cleanprefix = '') + public function getTableDefPrefix($table, $cleanprefix = ''): ?string { // Fetch table $t = $this->getTable($table); @@ -339,9 +339,9 @@ trait TableTrait * @param int $num Table attributes count + table * constraints count * - * @return string original $sql plus appended strings + * @return null|string */ - private function _dumpConstraints($cons, $table, $sql, $i, $num) + private function _dumpConstraints($cons, $table, $sql, $i, $num): ?string { // Output all table constraints while (!$cons->EOF) { @@ -391,9 +391,9 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblfields table field attributes * @param string $sql The sql sentence generated so far * - * @return string original $sql plus appended strings + * @return null|string */ - private function _dumpColStats($atts, $tblfields, $sql) + private function _dumpColStats($atts, $tblfields, $sql): ?string { // Column storage and statistics $atts->moveFirst(); @@ -449,9 +449,9 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblfields The table fields definition * @param string $sql The sql sentence generated so far * - * @return string original $sql plus appended strings + * @return null|string */ - private function _dumpPrivileges($privs, $tblfields, $sql) + private function _dumpPrivileges($privs, $tblfields, $sql): ?string { if (sizeof($privs) <= 0) { return $sql; @@ -585,7 +585,7 @@ trait TableTrait * * @param string $table The name of the table * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTable($table) { @@ -620,7 +620,7 @@ trait TableTrait * @param string $table The name of the table * @param string $c_schema The name of the schema * - * @return \PHPPgAdmin\ADORecordSet All attributes in order + * @return \PHPPgAdmin\ADORecordSet|int */ private function _getTableAttributesAll($table, $c_schema) { @@ -672,7 +672,7 @@ trait TableTrait * @param string $c_schema The schema of the table * @param string $field (optional) The name of a field to return * - * @return \PHPPgAdmin\ADORecordSet All attributes in order + * @return \PHPPgAdmin\ADORecordSet|int */ private function _getTableAttribute($table, $c_schema, $field) { @@ -729,7 +729,7 @@ trait TableTrait * * @param string $table The table to find rules for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getConstraints($table) { @@ -803,9 +803,9 @@ trait TableTrait * * @param string $table The table to define * - * @return string A string containing the formatted SQL code + * @return null|string */ - public function getTableDefSuffix($table) + public function getTableDefSuffix($table): ?string { $sql = ''; @@ -870,7 +870,7 @@ trait TableTrait * @param string $table The name of a table whose indexes to retrieve * @param bool $unique Only get unique/pk indexes * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getIndexes($table = '', $unique = false) { @@ -897,7 +897,7 @@ trait TableTrait * * @param string $table The name of a table whose triggers to retrieve * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTriggers($table = '') { @@ -928,7 +928,7 @@ trait TableTrait * * @param string $table The table to find rules for * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getRules($table) { @@ -1289,7 +1289,7 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable() * @param null|string $owner * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterTableOwner($tblrs, $owner = null) { @@ -1315,7 +1315,7 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable() * @param null|string $tablespace * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterTableTablespace($tblrs, $tablespace = null) { @@ -1341,7 +1341,7 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable() * @param string $name The new table's name * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterTableName($tblrs, $name = null) { @@ -1372,7 +1372,7 @@ trait TableTrait * @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable() * @param null|string $schema * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterTableSchema($tblrs, $schema = null) { @@ -1420,7 +1420,7 @@ trait TableTrait * @param string $table The table to drop * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropTable($table, $cascade) { @@ -1498,7 +1498,7 @@ trait TableTrait * @param string $relation The name of a relation * @param bool $oids true to dump also the oids * - * @return \PHPPgAdmin\ADORecordSet A recordset on success + * @return \PHPPgAdmin\ADORecordSet|int */ public function dumpRelation($relation, $oids) { @@ -1598,7 +1598,7 @@ trait TableTrait * @param int $vaccostdelay vacuum cost delay * @param int $vaccostlimit vacuum cost limit * - * @return bool 0 if successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function saveAutovacuum( $table, @@ -1659,7 +1659,7 @@ trait TableTrait * * @param string $table The table * - * @return bool 0 if successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropAutovacuum($table) { diff --git a/src/database/databasetraits/TablespaceTrait.php b/src/database/databasetraits/TablespaceTrait.php index ed0fc8cc..0308443a 100644 --- a/src/database/databasetraits/TablespaceTrait.php +++ b/src/database/databasetraits/TablespaceTrait.php @@ -16,7 +16,7 @@ trait TablespaceTrait * * @param bool $all Include all tablespaces (necessary when moving objects back to the default space) * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTablespaces($all = false) { @@ -42,7 +42,7 @@ trait TablespaceTrait * * @param string $spcname * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTablespace($spcname) { @@ -154,7 +154,7 @@ trait TablespaceTrait * * @param string $spcname The name of the domain to drop * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropTablespace($spcname) { diff --git a/src/database/databasetraits/TriggerTrait.php b/src/database/databasetraits/TriggerTrait.php index 3fcd5ec3..c27f77fb 100644 --- a/src/database/databasetraits/TriggerTrait.php +++ b/src/database/databasetraits/TriggerTrait.php @@ -17,7 +17,7 @@ trait TriggerTrait * @param string $table The name of a table whose triggers to retrieve * @param string $trigger The name of the trigger to retrieve * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTrigger($table, $trigger) { @@ -47,7 +47,7 @@ trait TriggerTrait * @param string $tgfrequency * @param string $tgargs The function arguments * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createTrigger($tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs) { @@ -72,7 +72,7 @@ trait TriggerTrait * @param string $trigger The name of the trigger to alter * @param string $name The new name for the trigger * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterTrigger($table, $trigger, $name) { @@ -94,7 +94,7 @@ trait TriggerTrait * @param string $table The table from which to drop the trigger * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropTrigger($tgname, $table, $cascade) { @@ -117,7 +117,7 @@ trait TriggerTrait * @param string $tgname The name of the trigger to enable * @param string $table The table in which to enable the trigger * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function enableTrigger($tgname, $table) { @@ -137,7 +137,7 @@ trait TriggerTrait * @param string $tgname The name of the trigger to disable * @param string $table The table in which to disable the trigger * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function disableTrigger($tgname, $table) { @@ -188,7 +188,7 @@ trait TriggerTrait * @param bool $replace (optional) True to replace existing rule, false * otherwise * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function createRule($name, $event, $table, $where, $instead, $type, $action, $replace = false) { @@ -232,7 +232,7 @@ trait TriggerTrait * @param string $relation The relation from which to drop * @param string $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropRule($rule, $relation, $cascade) { diff --git a/src/database/databasetraits/TypeTrait.php b/src/database/databasetraits/TypeTrait.php index fc2da948..25d73d46 100644 --- a/src/database/databasetraits/TypeTrait.php +++ b/src/database/databasetraits/TypeTrait.php @@ -69,7 +69,7 @@ trait TypeTrait * * @param string $typname The name of the view to retrieve * - * @return \PHPPgAdmin\ADORecordSet type info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getType($typname) { @@ -88,7 +88,7 @@ trait TypeTrait * @param bool $tabletypes If true, will include table types * @param bool $domains If true, will include domains * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getTypes($all = false, $tabletypes = false, $domains = false) { @@ -145,7 +145,7 @@ trait TypeTrait * @param string $typalign * @param string $typstorage * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param $ ... */ @@ -207,7 +207,7 @@ trait TypeTrait * @param string $typname The name of the type to drop * @param bool $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropType($typname, $cascade) { @@ -283,7 +283,7 @@ trait TypeTrait * * @param string $name * - * @return \PHPPgAdmin\ADORecordSet A recordset + * @return \PHPPgAdmin\ADORecordSet|int */ public function getEnumValues($name) { @@ -425,7 +425,7 @@ trait TypeTrait /** * Returns a list of all casts in the database. * - * @return \PHPPgAdmin\ADORecordSet All casts + * @return \PHPPgAdmin\ADORecordSet|int */ public function getCasts() { @@ -470,7 +470,7 @@ trait TypeTrait /** * Returns a list of all conversions in the database. * - * @return \PHPPgAdmin\ADORecordSet All conversions + * @return \PHPPgAdmin\ADORecordSet|int */ public function getConversions() { diff --git a/src/database/databasetraits/ViewTrait.php b/src/database/databasetraits/ViewTrait.php index f0c9d6a3..7562b4c7 100644 --- a/src/database/databasetraits/ViewTrait.php +++ b/src/database/databasetraits/ViewTrait.php @@ -14,7 +14,7 @@ trait ViewTrait /** * Returns a list of all views in the database. * - * @return \PHPPgAdmin\ADORecordSet All views + * @return \PHPPgAdmin\ADORecordSet|int */ public function getViews() { @@ -34,7 +34,7 @@ trait ViewTrait /** * Returns a list of all materialized views in the database. * - * @return \PHPPgAdmin\ADORecordSet All materialized views + * @return \PHPPgAdmin\ADORecordSet|int */ public function getMaterializedViews() { @@ -159,7 +159,7 @@ trait ViewTrait * * @param string $view The name of the view or materialized to retrieve * - * @return \PHPPgAdmin\ADORecordSet [Materialized] View info + * @return \PHPPgAdmin\ADORecordSet|int */ public function getView($view) { @@ -232,7 +232,7 @@ trait ViewTrait * @param \PHPPgAdmin\ADORecordSet $vwrs The view recordSet returned by getView() * @param null|string $owner * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param $name new view's owner */ @@ -260,7 +260,7 @@ trait ViewTrait * @param \PHPPgAdmin\ADORecordSet $vwrs The view recordSet returned by getView() * @param string $name The new view's name * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function alterViewName($vwrs, $name) { @@ -288,7 +288,7 @@ trait ViewTrait * @param \PHPPgAdmin\ADORecordSet $vwrs The view recordSet returned by getView() * @param string $schema * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int * * @internal param The $name new view's schema */ @@ -316,7 +316,7 @@ trait ViewTrait * @param string $viewname The name of the view to drop * @param string $cascade True to cascade drop, false to restrict * - * @return int 0 if operation was successful + * @return \PHPPgAdmin\ADORecordSet|int */ public function dropView($viewname, $cascade) { |