summaryrefslogtreecommitdiffstats
path: root/lib/public/db
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-12-08 09:40:20 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-12-08 09:40:20 +0100
commitf2c7acb3c065c35a1e75d512d0ce193f1989296f (patch)
tree4c3cec0c14b0ea0b1f0cb092515d112cafd13ec9 /lib/public/db
parent736e133c047a22b587294a1231b61ac2575f3f83 (diff)
downloadnextcloud-server-f2c7acb3c065c35a1e75d512d0ce193f1989296f.tar.gz
nextcloud-server-f2c7acb3c065c35a1e75d512d0ce193f1989296f.zip
Allow getting the last insert id without much hassle
Diffstat (limited to 'lib/public/db')
-rw-r--r--lib/public/db/querybuilder/iquerybuilder.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/db/querybuilder/iquerybuilder.php b/lib/public/db/querybuilder/iquerybuilder.php
index beb922b7feb..e3105cf134e 100644
--- a/lib/public/db/querybuilder/iquerybuilder.php
+++ b/lib/public/db/querybuilder/iquerybuilder.php
@@ -796,4 +796,12 @@ 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();
}