summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/ExpressionBuilder
Commit message (Collapse)AuthorAgeFilesLines
* Cast datetime columns in sqlite before comparingJulius Härtl2023-12-293-86/+59
| | | | | | | Move the logic to prepare a column to the parent ExpressionBuilder so that it can be reused for OCI and sqlite Signed-off-by: Julius Härtl <jus@bitgrid.net>
* composer run cs:fixCôme Chilliet2023-01-203-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "make expression build return IQueryFunction instead of string"Robin Appelman2022-08-165-84/+81
| | | | | | This reverts commit 813b50ed428a8bc36817d19c84444e96dbe3b668. Signed-off-by: Robin Appelman <robin@icewind.nl>
* make expression build return IQueryFunction instead of stringRobin Appelman2022-06-025-81/+84
| | | | | | this allows passing the expressions to further expressions without them being escaped as column names Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix psalm complaintJoas Schilling2022-01-041-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Explicitly cast char in the query builderJulius Härtl2022-01-043-0/+21
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix default value for $type in ↵Côme Chilliet2021-11-231-2/+2
| | | | | | | | | OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder::literal This fixes PHP errors about passing null to PDO::quote second parameter. We may want to change IExpressionBuilder as well? Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* 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-045-6/+7
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Type the experssionbuildersRoeland Jago Douma2021-03-035-49/+51
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-082-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* 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>
* 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-102-2/+0
| | | | | | | | | | | | | | | 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 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 license headersChristoph Wurst2019-12-055-5/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add casting to string for postgresql query builderRobin Appelman2019-03-141-5/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Made IExpressionBuilder varadicRoeland Jago Douma2018-03-131-8/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* reuse query builderRobin Appelman2018-01-122-5/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* refactor user searchingRobin Appelman2017-12-202-3/+10
| | | | | | add additional user searching tests Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add a method to compare empty strings with an expressionJoas Schilling2017-08-022-0/+45
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix ILIKE regex for oracleJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove unused use statementsMorris Jobke2017-04-221-6/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* fix licence headersRobin Appelman2017-03-301-8/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add support for escaping like parameters when using the query builderRobin Appelman2017-03-302-0/+44
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add bitwise AND and OR to the expression builderJoas Schilling2017-01-051-1/+37
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix like queries in the QueryBuilderJoas Schilling2016-10-191-3/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update with robinJoas Schilling2016-07-212-2/+2
|
* Fix othersJoas Schilling2016-07-214-8/+12
|
* Move \OC\DB to PSR-4Roeland Jago Douma2016-04-154-0/+629
Besides the statement wrapper that is moved to the legacy folder (namepsace of shame folder)