aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "make expression build return IQueryFunction instead of string"Robin Appelman2022-08-166-92/+85
| | | | | | This reverts commit 813b50ed428a8bc36817d19c84444e96dbe3b668. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* add case statement to sql function builderRobin Appelman2022-06-021-0/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* make expression build return IQueryFunction instead of stringRobin Appelman2022-06-026-85/+92
| | | | | | 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 issues related to the user backendCarl Schwan2022-05-201-1/+1
| | | | | | | | | | | | | - Reflect the actual return value returned by the implementation in the the interface. E.g. IUser|bool -> IUser|false - Remove $hasLoggedIn parameter from private countUser implementation. Replace the two call with the equivalent countSeenUser - getBackend is nuallable, add this to the interface - Use backend interface to make psalm happy about call to undefined methods. Also helps with getting rid at some point of the old implementActions Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* tell mysql to ignore the sort index for search queriesRobin Appelman2022-04-221-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #31609 from nextcloud/fix/migrate-away-from-iloggerCôme Chilliet2022-03-291-16/+10
|\ | | | | Migrate from ILogger to LoggerInterface in lib/private
| * Fix log level for exception in QueryBuilderCôme Chilliet2022-03-241-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-16/+10
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix LENGTH function name across databasesCôme Chilliet2022-03-283-1/+13
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Use OCTET_LENGTH which is more common than LENGTHBCôme Chilliet2022-03-242-1/+7
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Add octetLength and charLength to function builder, and testsCôme Chilliet2022-03-242-0/+18
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #30379 from nextcloud/feature/add-comments-reactionsJoas Schilling2022-01-211-2/+2
|\ | | | | Add comments reactions
| * Remove order from groupConcat as it is not working everywhereJoas Schilling2022-01-214-5/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Fix groupConcat and ordering on OracleVitor Mattos2022-01-214-5/+5
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
| * Prevent query error when use subqueryVitor Mattos2022-01-211-2/+2
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Merge pull request #30471 from nextcloud/enh/cast-char-mysqlJoas Schilling2022-01-204-0/+22
|\ \ | |/ |/| Explicitly cast char in the query builder
| * 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>
* | Unit testsVitor Mattos2022-01-071-1/+1
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Accept multipe args on concatVitor Mattos2022-01-064-6/+30
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Use quote functionJoas Schilling2022-01-041-6/+2
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Try escaping Oracle single quotesJoas Schilling2022-01-041-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add a test with integerJoas Schilling2022-01-045-16/+26
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix oracle LISTAGGJoas Schilling2022-01-031-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add unit testVitor Mattos2022-01-034-23/+11
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Add unit test and orderBy parameterVitor Mattos2022-01-035-13/+38
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Add group_concat aggregator functionVitor Mattos2022-01-033-0/+18
|/ | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* 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>
* Allow NULL as well for limit, not integer onlyJoas Schilling2021-11-151-4/+8
| | | | 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>
* 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>