Commit Graph

165 Commits (b0197c5dfcb0dac94de43bfbfa89a2889fc1e30b)

Author SHA1 Message Date
dependabot[bot] bb598c8451
chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2.
- [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/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-19 07:57:35 +07:00
Ferdinand Thiessen db94e10af0
fix: Prevent breaking change in IQueryBuilder
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +07:00
Ferdinand Thiessen e314d52118
fix: Adjust parameter type usage and add SQLite support
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +07:00
provokateurin e445be1202
fix(QueryBuilder): Account for aliases in output columns
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-02 11:55:27 +07:00
provokateurin 35dfc639b3
fix(QueryBuilder): Restrict identifier length to 30 characters due to Oracle limitations
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 08:57:06 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
John Molakvoæ ff0cab5956
Merge pull request #47852 from nextcloud/sharding-code-fixes 2024-09-16 11:39:58 +07:00
Ferdinand Thiessen 027fc052e7
fix: Adjust types of IQueryBuilder to properly allow joining with sub-query
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-10 17:51:27 +07:00
Robin Appelman da59fd4389
fix: misc code fixes around db sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-09 16:59:59 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Louis Chemineau 2574cbfa61
chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-28 10:44:18 +07:00
Robin Appelman b21a399d1a
fix: implement sharding compatible cleanup for various bits
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:27:14 +07:00
Robin Appelman 62f8b6517f
feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:21:19 +07:00
Robin Appelman f5b3486744
feat: add option to automatically partition queries by specific tables
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:18:53 +07:00
Robin Appelman c09ec95255
feat: track expected output columns in query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:18:52 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Robin Appelman 658d2f7ea1 feat: expose escapeLikeParameter trough query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-23 15:12:10 +07:00
Stephan Orbaugh 65941811b3
Merge pull request #44788 from nextcloud/db-error-logging
feat: add additional logging for database errors
2024-07-25 09:09:57 +07:00
Robin Appelman 7fbb981877
feat: add additional logging for database errors
including the stack trace of the current database transaction

Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-24 15:35:07 +07:00
Robin Appelman 16c184e2cb
fix: cast to bigint on postgresql
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-23 14:41:13 +07:00
Joas Schilling b656edc47c
fix(db): Fix md5 for oracle >= 20
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 14:13:56 +07:00
Joas Schilling e1e4ee4d67
fix(db): Manually track if `where()` is called when not empty to avoid recursion
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:16 +07:00
Joas Schilling eeb6ddb176
fix(db): Deprecate `IExpressionBuilder::or()` and `IExpressionBuilder::and()` without parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:16 +07:00
Joas Schilling e45465781f
fix(db): Deprecate `getState()` as per upstream
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:15 +07:00
Joas Schilling 829f2b9bc7
fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of removed upstream platforms
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:14 +07:00
Joas Schilling bd383627a7
fix(db): Deprecate using table alias for DELETE and UPDATE
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:13 +07:00
Joas Schilling f92352eda4
fix(db): Deprecate `getQueryPart()` and `resetQueryPart()` methods that will be removed with Doctrine/DBAL 4
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:10 +07:00
Robin Appelman 9de6190ec4
feat: allow running QueryBuilder queries on different connections
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-15 22:41:04 +07:00
Robin Appelman f94b0c3f55
Merge pull request #46397 from nextcloud/extended-query-builder-base
feat: add base class for extending the query builder
2024-07-15 14:53:22 +07:00
Robin Appelman c82d382a20 feat: add base class for extending the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-12 17:01:39 +07:00
Robin Appelman d81d59e9c3 feat: allow inspecting the parts of the composite expression builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-12 17:01:36 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Joas Schilling 90ba7db0fb
fix(querybuilder): Remove temporary internal method executeUpdate()
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-30 15:13:12 +07:00
Côme Chilliet 26c4ca264f
fix: Remove bogus code from query builder and fix parameter name
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +07:00
Côme Chilliet ab6afe0111 fix: Fix new psalm errors from update
Not sure about the SimpleContainer modification, let’s see what CI says
 about that.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-08 11:29:09 +07:00
Julius Härtl 86dc766276 Cast datetime columns in sqlite before comparing
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>
2023-12-29 10:36:59 +07:00
Arthur Schiwon 93505b2cdd fix(workflowengine): use andWhere() not second where()
- 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>
2023-11-13 14:47:47 +07:00
Joas Schilling 15a7aa51c5
fix(dbal): Fix types in query builder methods for parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-18 07:09:08 +07:00
Faraz Samapoor e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Joas Schilling ecad09b38a
Merge pull request #36261 from nextcloud/techdebt/noid/warn-devs-about-potential-bugs
fix(querybuilder): Log a warning if where() is called again on a quer…
2023-01-23 18:47:25 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Joas Schilling 7f0a54c558
fix(querybuilder): Log a warning if where() is called again on a query builder object
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-01-20 07:41:19 +07:00
Robin Appelman 6e0123a1d0 Revert "add case statement to sql function builder"
This reverts commit 2a68819a67.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:13 +07:00
Robin Appelman 9b52663a81 Revert "make expression build return IQueryFunction instead of string"
This reverts commit 813b50ed42.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:09 +07:00
luz paz 368f83095d Fix typos in lib/private subdirectory
Found via `codespell -q 3 -S l10n -L jus ./lib/private`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Robin Appelman 2a68819a67
add case statement to sql function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 15:52:12 +07:00
Robin Appelman 813b50ed42
make expression build return IQueryFunction instead of string
this allows passing the expressions to further expressions without them being escaped as column names

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 15:52:08 +07:00
Carl Schwan 9ec0cb0a90 Fix psalm issues related to the user backend
- 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>
2022-05-20 17:14:58 +07:00
Robin Appelman a4e120c203
tell mysql to ignore the sort index for search queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 13:42:33 +07:00
Côme Chilliet 765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +07:00