Christoph Wurst
c2d5024599
fixup! feat(database): Add replacements for deprecated fetch and fetchAll
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-06 09:44:29 +07:00
Christoph Wurst
d25712d36b
fixup! feat(database): Add replacements for deprecated fetch and fetchAll
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-05 18:38:20 +07:00
Christoph Wurst
a6c3a7dfbc
fixup! feat(database): Add replacements for deprecated fetch and fetchAll
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-05 13:29:05 +07:00
Christoph Wurst
35968f2d91
feat(database): Add replacements for deprecated fetch and fetchAll
...
DBAL deprecated these and will remove them it in the future.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-27 14:36:02 +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
Joas Schilling
00d483585b
fix: Add options to support all used features by core
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:34 +07:00
Joas Schilling
bd0a149a4f
feat(dispatcher): Add typed event for "db:add-missing-primary-keys"
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:32 +07:00
Joas Schilling
2eded24eff
feat(dispatcher): Add typed event for "db:add-missing-columns"
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:32 +07:00
Julius Härtl
925bcebcb6
feat: Add public event for missing indices
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-07-14 13:11:22 +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
Carl Schwan
5a17415dd8
Add a few more non-extendable interface
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-05 14:35:34 +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
Robin Appelman
695326534c
disable path prefix index on postgresql for now
...
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement.
to prevent making it harder to add the correct index later on we don't create the index for now on postgresql
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:39:22 +07:00
Joas Schilling
aae16c21e6
Allow casting query functions as well
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-07-07 14:20:24 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Lukas Reschke
4e7b82169c
executeUpdate is also deprecated
...
Ref 1089ad5d9e/lib/private/DB/QueryBuilder/QueryBuilder.php (L312-L323)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-05-25 20:25:44 +07:00
Christoph Wurst
865661ed75
Rename IQueryBuilder::executeUpdate to IQueryBuilder::executeStatement
...
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>
2021-05-05 10:31:54 +07:00
Arthur Schiwon
e7691ef6ab
remove undefined parameter, add description
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-22 16:23:01 +07:00
Roeland Jago Douma
85e48d796c
Merge pull request #25929 from nextcloud/techdept/psalm/25839/redundantcasts
...
Remove Redundantcasts
2021-03-05 08:42:54 +07:00
Roeland Jago Douma
d7f7d3bc51
Type CompositeExpression and ICompositeExpression
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-04 21:47:44 +07:00
Roeland Jago Douma
c3f1eb4f7f
Remove Redundantcasts
...
For #25839
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-04 14:44:04 +07:00
Roeland Jago Douma
76a6328d10
Add executeQuery and executeUpdate
...
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>
2021-03-04 14:03:31 +07:00
Joas Schilling
a6246be34c
Merge pull request #25656 from nextcloud/enh/type/expressionbuilder
...
Type the experssionbuilders
2021-03-03 11:37:16 +07:00
Roeland Jago Douma
4bdf9f5849
Type the experssionbuilders
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-03 10:44:09 +07:00
Robin Appelman
47dd8e54b5
allow non string join conditions in query builder
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-03 10:43:15 +07:00