Joas Schilling
b77011a918
test: Prepare more tests for PHPUnit 10
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-30 09:18:01 +02:00
Robin Appelman
0a77ba99a2
feat: support migrating an instance to sharding
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-25 17:52:40 +01:00
Ferdinand Thiessen
db94e10af0
fix: Prevent breaking change in IQueryBuilder
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +02: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 +02:00
John Molakvoæ
ff0cab5956
Merge pull request #47852 from nextcloud/sharding-code-fixes
2024-09-16 11:39:58 +02:00
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +02: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 +02:00
Arthur Schiwon
b71c539b5c
test(phpunit): skip sharding tests on 32bit
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-08-29 20:18:35 +02:00
Louis Chemineau
2574cbfa61
chore: Apply php:cs recommendations
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-28 10:44:18 +02: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 +02: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 +02: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 +02:00
Maxence Lange
ad490c963b
feat(migration-attributes): tests
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-07-29 12:44:52 -01: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 +02: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 +02: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 +02:00
Benjamin Gaussorgues
b7243681dd
feat(dbal): add proper insert ignore conflict method for SQLite
...
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-06-25 16:21:01 +02:00
John Molakvoæ
258bb03cf5
Merge branch 'master' into refactor/OC-Server-getSecureRandom
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:24:22 +02:00
Daniel Kesselberg
3fb0aa40cd
feat(db): add mapping for lock wait timeout
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-05-29 11:10:43 +02:00
Christoph Wurst
3bfba2042c
fix(db): Prevent two connections for single node databases
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-05-28 10:38:36 +02:00
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +02:00
Joas Schilling
b04f6d57b4
fix(tests): Make PostgreSQL unit tests less flacky by ordering
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-01-25 06:47:39 +01:00
Maxence Lange
f7d0c74b10
lazy AppConfig
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-01-15 15:45:13 -01:00
Julius Härtl
e50cb0a30f
tests(DB): Add test for date time comparisons in query builder
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-29 10:36:59 +01:00
Joas Schilling
ccb01b19a0
fix(sqlite): Remove some old SQLite cheats
...
- Doctrine correctly forces integer for autoincrement by now
- Doctrine correctly maintains integer types by now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:27 +02:00
Joas Schilling
160298c556
fix(mysql): Remove custom MySQL workaround from 2015
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:25 +02:00
Joas Schilling
b202b139dd
fix(postgres): Remove old Postgres 9.4 workaround
...
Postgres 10 is the minimum in the meantime
and doctrine/dbal fixed this in 2.6.0 already
ref https://github.com/doctrine/dbal/pull/2614
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:25 +02:00
Andrew Summers
1395a53602
Refactor OC\Server::getSecureRandom
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-08-29 21:32:40 -05:00
Joas Schilling
b80692d323
fix(tests): Adjust unit tests to outline the schema is checked twice now
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-21 12:17:36 +02:00
Côme Chilliet
8d5165e8dc
Adapt tests to config value typing
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:42:14 +02:00
Ferdinand Thiessen
1785a80754
tests(db): Add test case to ensure column comments work
...
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-28 10:39:13 +01:00
Julius Härtl
c246edece6
tests(oci): Test where statement on longtext column
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
test: try with just passing the type to eq which should also cast
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-31 11:57:54 +01: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 +01:00
Côme Chilliet
70e2217d1c
Fix dynamic properties and other problems in tests for PHP 8.2
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 16:14:35 +01:00
Côme Chilliet
a83a8f0dde
Migrate Migrator::executeSql to OCP\EventDispatcher\Event
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:13:47 +02: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 +02:00
Côme Chilliet
6a1510f8ee
Remove some more at matchers in tests/lib
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-20 10:53:06 +02: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 +02: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 +02:00
Côme Chilliet
dd357d7f9b
Merge pull request #31679 from nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000
...
Ensure string column limit of 4.000 characters
2022-03-31 11:37:43 +02: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 +02:00
Joas Schilling
129bae62d4
Ensure string column limit of 4.000 characters
...
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/datatype-limits.html#GUID-963C79C9-9303-49FE-8F2D-C8AAF04D3095
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-25 12:44:51 +01:00
Côme Chilliet
bfd09a0669
Avoid select with no FROM clause for Oracle in tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 20:35:02 +00: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 +00:00
Côme Chilliet
61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:26 +01:00
Joas Schilling
89e293d3fd
Test disabled for now due to multiple reasons
...
see https://github.com/nextcloud/server/pull/31580#issuecomment-1069182234 for details
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-22 17:07:48 +01:00
Joas Schilling
1970d3dc9a
Add a test for primary keys
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 14:04:04 +01:00
Vitor Mattos
b6d9e0542d
Fix column size to work with Oracle. Add unit tests
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 -03:00
Vitor Mattos
afe5b6dd8a
Prevent query error when use subquery
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 -03:00
Carl Schwan
89d109a4d9
Merge pull request #30508 from nextcloud/fix/psaml-bin
...
Fix psalm not running
2022-01-13 09:51:04 +01:00