aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/QueryBuilder.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(QueryBuilder): Restrict identifier length to 30 characters due to Oracle ↵fix/querybuilder/oracle-indentifier-lengthprovokateurin2024-09-261-0/+17
| | | | | | limitations Signed-off-by: provokateurin <kate@provokateurin.de>
* Merge pull request #47852 from nextcloud/sharding-code-fixesJohn Molakvoæ2024-09-161-3/+3
|\
| * fix: misc code fixes around db shardingsharding-code-fixesRobin Appelman2024-09-091-3/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: Adjust types of IQueryBuilder to properly allow joining with sub-queryFerdinand Thiessen2024-09-101-1/+1
|/ | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: implement sharding compatible cleanup for various bitsRobin Appelman2024-08-281-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-281-1/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add option to automatically partition queries by specific tablesRobin Appelman2024-08-281-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: track expected output columns in query builderRobin Appelman2024-08-281-0/+29
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-6/+6
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat: expose escapeLikeParameter trough query builderRobin Appelman2024-08-231-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add additional logging for database errorsRobin Appelman2024-07-241-0/+1
| | | | | | including the stack trace of the current database transaction Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(db): Manually track if `where()` is called when not empty to avoid recursionJoas Schilling2024-07-191-19/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `IExpressionBuilder::or()` and ↵Joas Schilling2024-07-191-7/+8
| | | | | | `IExpressionBuilder::and()` without parameters Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `getState()` as per upstreamJoas Schilling2024-07-191-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-191-30/+12
| | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate using table alias for DELETE and UPDATEJoas Schilling2024-07-191-0/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `getQueryPart()` and `resetQueryPart()` methods that will ↵Joas Schilling2024-07-191-0/+12
| | | | | | be removed with Doctrine/DBAL 4 Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat: allow running QueryBuilder queries on different connectionsRobin Appelman2024-07-151-34/+42
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-27/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(querybuilder): Remove temporary internal method executeUpdate()Joas Schilling2024-04-301-15/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Remove bogus code from query builder and fix parameter nameCôme Chilliet2024-04-301-6/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(workflowengine): use andWhere() not second where()Arthur Schiwon2023-11-131-1/+1
| | | | | | | - an unconditional where() condition is added right before - fixes also wrongly named methods in the Exception message Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(dbal): Fix types in query builder methods for parametersJoas Schilling2023-10-181-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Merge pull request #36261 from ↵Joas Schilling2023-01-231-0/+6
|\ | | | | | | | | nextcloud/techdebt/noid/warn-devs-about-potential-bugs fix(querybuilder): Log a warning if where() is called again on a quer…
| * fix(querybuilder): Log a warning if where() is called again on a query ↵Joas Schilling2023-01-201-0/+6
| | | | | | | | | | | | builder object Signed-off-by: Joas Schilling <coding@schilljs.com>
* | composer run cs:fixCôme Chilliet2023-01-201-1/+0
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "make expression build return IQueryFunction instead of string"Robin Appelman2022-08-161-8/+4
| | | | | | 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>
* make expression build return IQueryFunction instead of stringRobin Appelman2022-06-021-4/+8
| | | | | | 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>
* 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>
* Prevent query error when use subqueryVitor Mattos2022-01-211-2/+2
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Add a test with integerJoas Schilling2022-01-041-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add unit test and orderBy parameterVitor Mattos2022-01-031-4/+4
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* 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>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+1
| | | | 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>
* | 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>
* allow non string join conditions in query builderRobin Appelman2021-03-031-5/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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-081-21/+32
| | | | 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>