aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder
Commit message (Collapse)AuthorAgeFilesLines
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-256-24/+24
| | | | 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>
* Merge pull request #44788 from nextcloud/db-error-loggingStephan Orbaugh2024-07-251-0/+1
|\ | | | | feat: add additional logging for database errors
| * 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: cast to bigint on postgresqlRobin Appelman2024-07-231-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(db): Fix md5 for oracle >= 20Joas Schilling2024-07-192-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* 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-193-22/+24
| | | | | | `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-152-41/+50
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #46397 from nextcloud/extended-query-builder-baseRobin Appelman2024-07-151-0/+290
|\ | | | | feat: add base class for extending the query builder
| * feat: add base class for extending the query builderRobin Appelman2024-07-121-0/+290
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat: allow inspecting the parts of the composite expression builderRobin Appelman2024-07-122-18/+31
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-05-2415-307/+50
| | | | 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: Fix new psalm errors from updateCôme Chilliet2024-04-083-12/+3
| | | | | | | Not sure about the SimpleContainer modification, let’s see what CI says about that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* 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>
* 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-204-4/+0
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "add case statement to sql function builder"Robin Appelman2022-08-161-11/+0
| | | | | | This reverts commit 2a68819a67045d87a369a8a6413f153b3b2bea5f. Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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>