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
Joas Schilling
0acd4b5f82
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
...
Extract request id handling to dedicated class so it can be injected without DB dependency
2022-03-22 12:08:45 +07:00
Joas Schilling
3bed983a9c
Disable for now again until more apps are fixed
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-21 12:14:19 +07:00
Joas Schilling
32ede5489e
Limit missing primary key fail to new tables
...
This will work on CI so devs notice it when they install the app for testing,
and at the same time existing faulty tables don't break the upgrade to 24
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-21 12:14:19 +07:00
Joas Schilling
b35253a4c3
Enforce primary keys as they are required to be performant in MySQL clusters
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 10:24:05 +07:00
Julius Härtl
83717a7800
Add event logging for db and redis connection
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-28 11:24:41 +07:00
Louis Chemineau
405c5eb813
Add --dry-run option for db:add-missing-* cmd
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-24 16:42:08 +07:00
Joas Schilling
1c138d3ae2
Allow to prefix the Query log with the request id
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +07:00
Joas Schilling
76541170bb
Allow specify a config prefix for another database connection
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-03 17:16:03 +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
John Molakvoæ
eb3cf6c5ec
Merge pull request #30129 from nextcloud/mdb10.6-pipeline
2022-01-19 09:25:46 +07:00
Carl Schwan
89d109a4d9
Merge pull request #30508 from nextcloud/fix/psaml-bin
...
Fix psalm not running
2022-01-13 09:51:04 +07:00
Carl Schwan
6312c0df69
Check style update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Vitor Mattos
f732cf1b04
Unit tests
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-07 09:54:41 +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
Joas Schilling
eebed2c434
Fix psalm complaint
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-04 17:32:07 +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
ecc92067bf
Try escaping Oracle single quotes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-04 13:36:55 +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
Joas Schilling
e3e73a12ef
Fix oracle LISTAGG
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-03 21:43:53 +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
Carl Schwan
52760a95d9
Check if directoy is writable instead of possibly missing file
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-20 15:36:52 +07:00
acsfer
06b77fd666
Attempt to fix CI
2021-12-07 11:58:30 +07:00
Joas Schilling
168c673755
Allow to log DB, redis and LDAP requests into files
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:33:41 +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
Arthur Schiwon
ce283c12b6
make it possible to override the default collation
...
- allows admins to configure it for edge cases like accent sensitivity
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-01 11:57:47 +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
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
Christoph Wurst
2ab8268128
Do not check Oracle column constraints in unrelated migrations
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-19 13:05:34 +07:00
Joas Schilling
f9d4fa2d38
Rename the method to match what it does
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:18 +07:00
Joas Schilling
3696ef5b96
Don't allow Notnull for boolean columns
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:17 +07:00
Joas Schilling
133a6f4fe4
Document the constraints we test against
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:17 +07:00
Joas Schilling
c98cab137c
Fix exception messages spacing
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 10:21:10 +07:00
Morris Jobke
ab48d5e8cb
Cleanup unneeded code around database.xml
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-03-24 22:15:44 +07:00
Morris Jobke
37feee4e87
Merge pull request #24384 from nextcloud/cleanup/remove-old-migration-check
...
Remove dead code from checking core/apps before upgrades
2021-03-17 21:29:19 +07:00
Julius Härtl
a2f3077ee8
Skip db migration simulation for core schema changes
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-17 21:08:22 +07:00
Morris Jobke
459e0b311b
Merge pull request #25924 from nextcloud/bugfix/noid/only-mark-migrations-as-installed-after-executing-them-in-case-the-developer-broke-them
...
Only mark migrations as installed after execution
2021-03-17 20:29:28 +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