summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
Commit message (Collapse)AuthorAgeFilesLines
* Some php-cs fixesRoeland Jago Douma2019-11-2211-19/+15
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* add count() as shortcut for count('*') in FunctionBuilderRobin Appelman2019-11-131-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* return from QueryBuilder instead of IQueryBuilderRobin Appelman2019-11-131-31/+31
| | | | | | this make the type hints work properly with querybuilder subclasses Signed-off-by: Robin Appelman <robin@icewind.nl>
* add MAX and MIN to functionbuilderRobin Appelman2019-09-061-0/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* instead of upsert, fallback to default query on PgSQL <= 9.4Arthur Schiwon2019-08-141-1/+22
| | | | | | because there is no upsert yet Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Add event dispatcher to OCPChristoph Wurst2019-06-251-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* No need for platform hacks anymoreRoeland Jago Douma2019-05-141-22/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove the custom prefix from the table name length when checking on the ↵Joas Schilling2019-04-301-1/+1
| | | | | | default primary index Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to use Subqueries in fromJoas Schilling2019-04-161-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Indeces, columns and sequences don't have the table prefixJoas Schilling2019-03-281-6/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix PHPDocMorris Jobke2019-03-212-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Code cleanup.Ole Ostergaard2019-03-213-10/+8
| | | | Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
* Add supression of SqlInjectionChecker.Ole Ostergaard2019-03-212-0/+6
| | | | Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
* Add PostgreSQL specific implementation for includeIgnoreConflict.Ole Ostergaard2019-03-211-0/+12
| | | | Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
* Add insertIgnoreConflict to Adapter and use it for for executing the file ↵Ole Ostergaard2019-03-212-0/+17
| | | | | | locking. Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
* add casting to string for postgresql query builderRobin Appelman2019-03-141-5/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Only check the Oracle schema conditions if the app supports itJoas Schilling2018-12-171-2/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only check changed itemsJoas Schilling2018-12-171-13/+18
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #11942 from nextcloud/techdebt/noid/use-count-functionMorris Jobke2018-11-121-2/+3
|\ | | | | Use the defined func()->count() instead of manual counting
| * Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-2/+3
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add deprecation message ofr insertIfNotExistMorris Jobke2018-11-093-0/+3
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Catch UniqueConstraintViolationException inside insertIfNotExistMorris Jobke2018-11-093-5/+31
|/ | | | | | | | This is the most common case for the usage of this method. See also https://github.com/nextcloud/server/issues/12369 and the linked tickets. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use const for dbname and dbtableprefix defaultsDaniel Kesselberg2018-09-231-2/+8
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Disable Oracle enforcement for now until the following issues are solved:Joas Schilling2018-08-061-1/+2
| | | | | | | * Only apps should be checked which say they support oracle * Only check newly added items, to allow forward migration from an existing database structure Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix primary key handling on postgresJoas Schilling2018-07-271-3/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Ignore custom prefixes which are longerJoas Schilling2018-07-271-9/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Ignore automatic generated sequencesJoas Schilling2018-07-271-1/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix calculation of default nameJoas Schilling2018-07-271-3/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Prevent too long identifier namesJoas Schilling2018-07-271-1/+41
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only create the schema when moving between databasesJoas Schilling2018-07-191-9/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* MySQL 8.0+ and MariaDB 10.3+ are large prefix and barracuda by defaultJoas Schilling2018-07-091-4/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add count to function builderRobin Appelman2018-06-141-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix wrong hint about missing indexesMorris Jobke2018-06-131-3/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add a hint that some indexes are not added yetMorris Jobke2018-06-061-0/+39
| | | | | | | | | * gives the admin a chance to discover the missing indexes and improve the performance of the instance without digging through the manual * nicely integrated in the setup checks where this kind of hints belong to * also adds an option to integrate this from an app based on events * fix style of setting warnings Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #9425 from nextcloud/db-reconnect-timeoutMorris Jobke2018-06-042-1/+53
|\ | | | | Check connection status and attempt to reconnect each each minute
| * Check connection status and attempt to reconnect each each minuteRobin Appelman2018-05-082-1/+53
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add human readable description to migration stepsRobin Appelman2018-05-301-4/+23
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move regex to a function and add testsJoas Schilling2018-04-191-11/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow IPv6 database hostsJoas Schilling2018-04-181-6/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* dont keep shared database locks when running cli scriptsRobin Appelman2018-04-111-0/+8
| | | | | | For cli scripts we don't have the assumption that the universe will be cleaned up soon Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix Array to String conversion in QueryBuilderRoeland Jago Douma2018-04-051-1/+1
| | | | | | Fixes #9080 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made IExpressionBuilder varadicRoeland Jago Douma2018-03-131-8/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made orHaving varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made addHaving varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make having varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made addGroupBy varadicRoeland Jago Douma2018-03-131-3/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made groupBy varadicRoeland Jago Douma2018-03-131-3/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made orWhere varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made andWhere varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Made where varadicRoeland Jago Douma2018-03-131-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>