Fix static calls

This commit is contained in:
Philipp Holzer 2019-04-14 18:51:04 +02:00
parent 799417ed1a
commit 79f746d014
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5
1 changed files with 34 additions and 0 deletions

View File

@ -408,6 +408,29 @@ class DBA
return self::$dba->count($table, $condition);
}
/**
* @brief Returns the SQL condition string built from the provided condition array
*
* This function operates with two modes.
* - Supplied with a filed/value associative array, it builds simple strict
* equality conditions linked by AND.
* - Supplied with a flat list, the first element is the condition string and
* the following arguments are the values to be interpolated
*
* $condition = ["uid" => 1, "network" => 'dspr'];
* or:
* $condition = ["`uid` = ? AND `network` IN (?, ?)", 1, 'dfrn', 'dspr'];
*
* In either case, the provided array is left with the parameters only
*
* @param array $condition
* @return string
*/
public static function buildCondition(array &$condition = [])
{
return Database::buildCondition($condition);
}
/**
* @brief Fills an array with data from a query
*
@ -420,6 +443,17 @@ class DBA
return self::$dba->toArray($stmt, $do_close);
}
/**
* @brief Returns the SQL parameter string built from the provided parameter array
*
* @param array $params
* @return string
*/
public static function buildParameter(array $params = [])
{
return Database::buildParameter($params);
}
/**
* @brief Returns the error number of the last query
*