summaryrefslogtreecommitdiffstats
path: root/lib/public/DB
Commit message (Collapse)AuthorAgeFilesLines
* Allow NULL as well for limit, not integer onlyJoas Schilling2021-11-151-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump doctrine/dbal from 3.0.0 to 3.1.3Christoph Wurst2021-10-221-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* disable path prefix index on postgresql for nowRobin Appelman2021-10-081-1/+14
| | | | | | | having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement. to prevent making it harder to add the correct index later on we don't create the index for now on postgresql Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow casting query functions as wellJoas Schilling2021-07-071-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0412-32/+24
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* executeUpdate is also deprecatedLukas Reschke2021-05-251-1/+1
| | | | | | Ref https://github.com/nextcloud/server/blob/1089ad5d9e74a0cfd3b48ed1514f23be40fe6d45/lib/private/DB/QueryBuilder/QueryBuilder.php#L312-L323 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Rename IQueryBuilder::executeUpdate to IQueryBuilder::executeStatementChristoph Wurst2021-05-051-4/+4
| | | | | | | | | Because executeUpdate wasn't a great name. And in DBAL they also use executeStatement more consistently now. Ref https://github.com/doctrine/dbal/issues/4607 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* remove undefined parameter, add descriptionArthur Schiwon2021-04-221-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #25929 from nextcloud/techdept/psalm/25839/redundantcastsRoeland Jago Douma2021-03-051-1/+1
|\ | | | | Remove Redundantcasts
| * Remove RedundantcastsRoeland Jago Douma2021-03-041-1/+1
| | | | | | | | | | | | For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Type CompositeExpression and ICompositeExpressionRoeland Jago Douma2021-03-041-4/+4
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Add executeQuery and executeUpdateRoeland Jago Douma2021-03-041-0/+23
|/ | | | | | | | | | | Names shamelessly copied from Doctrine itself. Internally it is still using the same flow. But I added some checks around it. This should make static analysis a bit more happy. Which in turn makes me more happy. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #25656 from nextcloud/enh/type/expressionbuilderJoas Schilling2021-03-031-28/+28
|\ | | | | Type the experssionbuilders
| * Type the experssionbuildersRoeland Jago Douma2021-03-031-28/+28
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | allow non string join conditions in query builderRobin Appelman2021-03-031-4/+4
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add expression taint source and sanitizerLukas Reschke2021-02-172-0/+152
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Merge pull request #25091 from ↵Christoph Wurst2021-01-142-0/+151
|\ | | | | | | | | nextcloud/enhancement/ocp-db-exception-abstraction Add our own DB exception abstraction
| * Add our own DB exception abstractionChristoph Wurst2021-01-122-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now our API exports the Doctrine/dbal exception. As we've seen with the dbal 3 upgrade, the leakage of 3rdparty types is problematic as a dependency update means lots of work in apps, due to the direct dependency of what Nextcloud ships. This breaks this dependency so that apps only need to depend on our public API. That API can then be vendor (db lib) agnostic and we can work around future deprecations/removals in dbal more easily. Right now the type of exception thrown is transported as "reason". For the more popular types of errors we can extend the new exception class and allow apps to catch specific errors only. Right now they have to catch-check-rethrow. This is not ideal, but better than the dependnecy on dbal. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Add our own constants for db column typesChristoph Wurst2021-01-121-0/+113
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-083-1/+216
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22916 from J0WI/unifiy-links-to-php.netRoeland Jago Douma2020-12-221-1/+1
|\ | | | | Unify links to php.net
| * Unify links to php.netJ0WI2020-09-171-1/+1
| | | | | | | | | | | | Update all links to https://www.php.net/ Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Add types to function builderJoas Schilling2020-11-161-27/+27
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Update parametersJoas Schilling2020-11-071-6/+4
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Psalm fixesRoeland Jago Douma2020-10-301-1/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #23144 from nextcloud/enh/noid/update-param-for-psalmMorris Jobke2020-10-062-8/+8
|\ \ | | | | | | Less psalm warnings
| * | Add explicit typecast for $value.Daniel Kesselberg2020-10-031-1/+1
| | | | | | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| * | Update signature for setDaniel Kesselberg2020-10-021-1/+1
| | | | | | | | | | | | | | | | | | also ILiteral and IQueryFunction are valid. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| * | Update signature for in/notInDaniel Kesselberg2020-10-021-2/+2
| | | | | | | | | | | | | | | | | | $y is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| * | Update signature for like/notLike/in/notInDaniel Kesselberg2020-10-021-4/+4
| |/ | | | | | | | | | | $x is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* / Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22432 from nextcloud/enh/phpdocRoeland Jago Douma2020-08-261-1/+0
|\ | | | | Add php docs build script
| * Remove @package annotations from public namespaceJulius Härtl2020-08-261-1/+0
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update documentation for QueryBuilder::setDaniel Kesselberg2020-08-141-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-102-14/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-2/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-058-8/+17
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add LEAST and GREATER to db function builderRobin Appelman2019-11-261-0/+30
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-223-0/+3
| | | | | | | | | | | * 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-1/+1
| | | | 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/+20
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-2/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add count to function builderRobin Appelman2018-06-141-0/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>