Carl Schwan
1dc363581f
fix: get all available previews on Oracle
...
Split the DB requests in chunk of 1000 and use INNER JOIN instead of IN
as this is better supported on all DB.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-23 14:10:15 +07:00
Carl Schwan
1eff9e5c90
feat(querybuilder): Remove deprecated IQueryBuilder::execute
...
This won't work when we update to doctrine DBAL 4 and all usages in
server were ported away.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-13 17:02:04 +07:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +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
ee02e3246d
feat(AppFramework): Add full support for date / time / datetime columns
...
This adds support for all Doctrine supported types, for the column types only the immutable variants needed to be added.
But especially those types are the important ones, as our **Entity** class works by detecting changes through setters.
Meaning if it is mutable, changes like `$entity->date->modfiy()` can not be detected, so the immutable types make more sense here.
Similar the parameter types needed to be added.
`Enity` and `QBMapper` needed to be adjusted so they support (auto map) those types, required when insert or update an entity.
Also added more tests, especially to make sure the mapper really serializes the values correctly.
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:42 +07:00
Robin Appelman
b45f2420fe
fix: fix share reminder job for oracle
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-18 19:24:44 +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
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
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
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
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
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet
6d291ac260
chore: Add missing parameter to docblock tag psalm-taint-sink
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-22 16:38:08 +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
Joas Schilling
c4ed7f9d21
fix(dbal): Doctrine\DBAL\Connection::PARAM_* types are deprecated
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:24 +07:00
Joas Schilling
5a1fcdb272
fix(dbal): Migrate to Doctrine\DBAL\ParameterTypes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-23 09:08:08 +07:00
Simon L
d55a7c619d
Fix typos in lib/public subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/public`
Signed-off-by: luz paz <luzpaz@github.com>
Update lib/public/Accounts/IAccount.php
Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: Simon L <szaimen@e.mail.de>
Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2023-05-10 11:56:34 +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
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
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
Joas Schilling
be4faebc47
Adjust docs to the same as the implementation
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-23 12:56:47 +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
Carl Schwan
7817845538
Add a metadata service to store file metadata
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +07:00
Côme Chilliet
efebbacca4
Add octetLength and charLength to function builder, and tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 20:35:02 +07:00
Carl Schwan
c870bd1968
Do chuncked job deletion
...
This is helpful in cases where we are deleting tons jobs at the same
time in a gallera cluster. This doesn't happen often but this can create
issues.
Test plan:
1. Use https://github.com/nextcloud/quota_warning/pull/88
2. Change max to 1
3. Enabled/Disable quota_warning app and see jobs getting sucessfully
added and removed
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-17 21:41:58 +07:00
Joas Schilling
fccb98c8b6
Merge pull request #30379 from nextcloud/feature/add-comments-reactions
...
Add comments reactions
2022-01-21 15:08:12 +07:00
Joas Schilling
d850dc0220
Remove order from groupConcat as it is not working everywhere
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:39 +07:00
Vitor Mattos
f071b4dfbb
Fix groupConcat and ordering on Oracle
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:39 +07:00
Vitor Mattos
afe5b6dd8a
Prevent query error when use subquery
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 +07:00
Joas Schilling
de9fe8fcc1
Merge pull request #30471 from nextcloud/enh/cast-char-mysql
...
Explicitly cast char in the query builder
2022-01-20 14:32:56 +07:00
Vitor Mattos
814924a787
Accept multipe args on concat
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-06 08:12:10 +07:00
Julius Härtl
a169ca306e
Explicitly cast char in the query builder
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-04 16:53:00 +07:00
Joas Schilling
005e717fe6
Use quote function
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-04 13:59:54 +07:00
Joas Schilling
46ad6fa3c7
Add a test with integer
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-04 09:15:17 +07:00
Vitor Mattos
fb6a9f308d
Add unit test
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-03 21:41:38 +07:00
Vitor Mattos
7b9fea85b6
Add unit test and orderBy parameter
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-03 12:45:00 +07:00
Vitor Mattos
79b3df00f8
Add group_concat aggregator function
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-03 07:48:11 +07:00
Côme Chilliet
18a91f02fa
Fix default value for $type in 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>
2021-11-23 09:29:02 +07:00
Joas Schilling
5bb49feef8
Allow NULL as well for limit, not integer only
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 18:51:28 +07:00
Christoph Wurst
130ab63ca1
Bump doctrine/dbal from 3.0.0 to 3.1.3
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:03:45 +07:00