aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder
Commit message (Collapse)AuthorAgeFilesLines
* make it possible to override the default collationArthur Schiwon2021-09-011-3/+3
| | | | | | - allows admins to configure it for edge cases like accent sensitivity Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Allow casting query functions as wellJoas Schilling2021-07-073-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0415-21/+13
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Rename IQueryBuilder::executeUpdate to IQueryBuilder::executeStatementChristoph Wurst2021-05-051-2/+17
| | | | | | | | | 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>
* Merge pull request #25929 from nextcloud/techdept/psalm/25839/redundantcastsRoeland Jago Douma2021-03-051-2/+2
|\ | | | | Remove Redundantcasts
| * Remove RedundantcastsRoeland Jago Douma2021-03-041-2/+2
| | | | | | | | | | | | For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Type CompositeExpression and ICompositeExpressionRoeland Jago Douma2021-03-041-5/+5
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Add executeQuery and executeUpdateRoeland Jago Douma2021-03-041-0/+37
|/ | | | | | | | | | | 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-035-49/+51
|\ | | | | Type the experssionbuilders
| * Type the experssionbuildersRoeland Jago Douma2021-03-035-49/+51
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | allow non string join conditions in query builderRobin Appelman2021-03-031-5/+6
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* DB: warn on parameter number constraintsArthur Schiwon2021-01-111-0/+30
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-083-29/+40
| | | | 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-163-0/+3
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Prevent * and other things in the same query for OracleJoas Schilling2020-12-141-0/+21
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Prevent log_query to mess up regular execution flowVincent Petry2020-12-021-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | When the "log_query" debug config parameter is set, SQL queries are logged. However, if an error occurs when converting the values to string, it will abort the request. This fix catches the error and continues instead. Also added handler for DateTime value which is already known to cause aborts here. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* | Merge pull request #24007 from nextcloud/select-distinct-multipleMorris Jobke2020-11-191-1/+7
|\ \ | | | | | | allow selecting multiple columns with SELECT DISTINCT
| * | allow selecting multiple columns with SELECT DISTINCTRobin Appelman2020-11-161-1/+7
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Add types to function builderJoas Schilling2020-11-164-43/+20
|/ / | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #23923 from ↵Roeland Jago Douma2020-11-073-0/+69
|\ \ | | | | | | | | | | | | nextcloud/bugfix/oci/fix-greatest-order-for-oracle Fix greatest/least order for oracle
| * | Update parametersJoas Schilling2020-11-073-2/+28
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * | Make sure Oracle always casts everything in the best wayJoas Schilling2020-11-061-0/+43
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix iLike() falsely turning escaped % and _ into wildcardsJoas Schilling2020-11-061-3/+1
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix casting to integer on OracleJoas Schilling2020-11-061-0/+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>
* | Add explicit typecast for $value.Daniel Kesselberg2020-10-031-2/+2
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Update signature for setDaniel Kesselberg2020-10-021-1/+2
| | | | | | | | | | | | 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/+5
|/ | | | | | $x is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* 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>
* Revert "Make sure MySQL is not saying 'this' = 'this ' is true"Roeland Jago Douma2020-04-151-8/+0
|
* Make sure MySQL is not saying 'this' = 'this ' is trueJoas Schilling2020-04-151-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-106-8/+2
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-094-4/+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-0515-15/+20
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add LEAST and GREATER to db function builderRobin Appelman2019-11-262-0/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * 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>
* Allow to use Subqueries in fromJoas Schilling2019-04-161-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>