diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-08 13:51:45 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-08 13:51:45 +0100 |
commit | 45fe8271ab1efb90ad0394bec0285f83b1ccd55c (patch) | |
tree | bd73ff50105f9ac125b7a8c02d1a367725d0005c /lib/public | |
parent | 85409b6701ffd46806f4a53b69dce0fa6a09d2a9 (diff) | |
parent | 9f9884930609addad3e37325731fb5406dd3aa44 (diff) | |
download | nextcloud-server-45fe8271ab1efb90ad0394bec0285f83b1ccd55c.tar.gz nextcloud-server-45fe8271ab1efb90ad0394bec0285f83b1ccd55c.zip |
Merge pull request #21030 from owncloud/querybuilder-new-features
Querybuilder new features
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/db/querybuilder/iquerybuilder.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/public/db/querybuilder/iquerybuilder.php b/lib/public/db/querybuilder/iquerybuilder.php index beb922b7feb..dd3ee7da5f5 100644 --- a/lib/public/db/querybuilder/iquerybuilder.php +++ b/lib/public/db/querybuilder/iquerybuilder.php @@ -257,6 +257,22 @@ interface IQueryBuilder { public function selectAlias($select, $alias); /** + * Specifies an item that is to be returned uniquely in the query result. + * + * <code> + * $qb = $conn->getQueryBuilder() + * ->selectDistinct('type') + * ->from('users'); + * </code> + * + * @param mixed $select The selection expressions. + * + * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. + * @since 9.0.0 + */ + public function selectDistinct($select); + + /** * Adds an item that is to be returned in the query result. * * <code> @@ -796,4 +812,31 @@ interface IQueryBuilder { * @since 8.2.0 */ public function createFunction($call); + + /** + * Used to get the id of the last inserted element + * @return int + * @throws \BadMethodCallException When being called before an insert query has been run. + * @since 9.0.0 + */ + public function getLastInsertId(); + + /** + * Returns the table name quoted and with database prefix as needed by the implementation + * + * @param string $table + * @return string + * @since 9.0.0 + */ + public function getTableName($table); + + /** + * Returns the column name quoted and with table alias prefix as needed by the implementation + * + * @param string $column + * @param string $tableAlias + * @return string + * @since 9.0.0 + */ + public function getColumnName($column, $tableAlias = ''); } |