aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB
Commit message (Collapse)AuthorAgeFilesLines
* test(MigrationService): adjust for changed naming restrictionsFerdinand Thiessen5 days1-211/+387
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* test(DB): split MetadataManager tests into their own classFerdinand Thiessen5 days1-176/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat: support migrating an instance to shardingsharding-existingRobin Appelman2025-02-251-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Prevent breaking change in IQueryBuilderFerdinand Thiessen2024-10-171-6/+6
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat(AppFramework): Add full support for date / time / datetime columnsFerdinand Thiessen2024-10-171-2/+2
| | | | | | | | | | | | | | | | 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>
* Merge pull request #47852 from nextcloud/sharding-code-fixesJohn Molakvoæ2024-09-161-2/+2
|\
| * fix: misc code fixes around db shardingsharding-code-fixesRobin Appelman2024-09-092-14/+14
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-1511-120/+120
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* test(phpunit): skip sharding tests on 32bitArthur Schiwon2024-08-292-0/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Apply php:cs recommendationsLouis Chemineau2024-08-282-3/+3
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-283-2/+136
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add option to automatically partition queries by specific tablesRobin Appelman2024-08-282-0/+290
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-255-7/+7
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat(migration-attributes): testsMaxence Lange2024-07-291-4/+177
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* fix(db): Deprecate `IExpressionBuilder::or()` and ↵Joas Schilling2024-07-191-1/+6
| | | | | | `IExpressionBuilder::and()` without parameters Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-193-16/+10
| | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat: allow running QueryBuilder queries on different connectionsRobin Appelman2024-07-151-31/+58
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat(dbal): add proper insert ignore conflict method for SQLiteBenjamin Gaussorgues2024-06-251-0/+66
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Merge branch 'master' into refactor/OC-Server-getSecureRandomJohn Molakvoæ2024-05-3011-159/+217
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * feat(db): add mapping for lock wait timeoutDaniel Kesselberg2024-05-291-0/+2
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| * fix(db): Prevent two connections for single node databasesChristoph Wurst2024-05-281-0/+101
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * chore: Add SPDX headerAndy Scherzinger2024-05-1310-142/+26
| | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
| * fix(tests): Make PostgreSQL unit tests less flacky by orderingJoas Schilling2024-01-251-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * lazy AppConfigMaxence Lange2024-01-151-0/+1
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
| * tests(DB): Add test for date time comparisons in query builderJulius Härtl2023-12-291-0/+86
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * fix(sqlite): Remove some old SQLite cheatsJoas Schilling2023-10-061-4/+0
| | | | | | | | | | | | | | - Doctrine correctly forces integer for autoincrement by now - Doctrine correctly maintains integer types by now Signed-off-by: Joas Schilling <coding@schilljs.com>
| * fix(mysql): Remove custom MySQL workaround from 2015Joas Schilling2023-10-061-8/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * fix(postgres): Remove old Postgres 9.4 workaroundJoas Schilling2023-10-061-4/+0
| | | | | | | | | | | | | | | | 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>
* | Refactor `OC\Server::getSecureRandom`Andrew Summers2023-08-291-1/+2
|/ | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* fix(tests): Adjust unit tests to outline the schema is checked twice nowJoas Schilling2023-07-211-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adapt tests to config value typingCôme Chilliet2023-04-051-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* tests(db): Add test case to ensure column comments workFerdinand Thiessen2023-02-281-0/+24
| | | | Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* tests(oci): Test where statement on longtext columnJulius Härtl2023-01-311-0/+18
| | | | | | | | 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>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix dynamic properties and other problems in tests for PHP 8.2Côme Chilliet2022-11-141-1/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate Migrator::executeSql to OCP\EventDispatcher\EventCôme Chilliet2022-08-251-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "add case statement to sql function builder"Robin Appelman2022-08-161-17/+0
| | | | | | This reverts commit 2a68819a67045d87a369a8a6413f153b3b2bea5f. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove some more at matchers in tests/libCôme Chilliet2022-06-201-6/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* add case statement to sql function builderRobin Appelman2022-06-021-0/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add a metadata service to store file metadataCarl Schwan2022-04-131-0/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #31679 from ↵Côme Chilliet2022-03-311-0/+40
|\ | | | | | | | | nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000 Ensure string column limit of 4.000 characters
| * Ensure string column limit of 4.000 charactersJoas Schilling2022-03-251-0/+40
| | | | | | | | | | | | 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>
* | Merge pull request #31609 from nextcloud/fix/migrate-away-from-iloggerCôme Chilliet2022-03-291-16/+16
|\ \ | | | | | | Migrate from ILogger to LoggerInterface in lib/private
| * | Migrate from ILogger to LoggerInterface where needed in the testsCôme Chilliet2022-03-241-16/+16
| |/ | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Avoid select with no FROM clause for Oracle in testsCôme Chilliet2022-03-241-0/+4
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Add octetLength and charLength to function builder, and testsCôme Chilliet2022-03-241-0/+46
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Test disabled for now due to multiple reasonsJoas Schilling2022-03-221-0/+1
| | | | | | see https://github.com/nextcloud/server/pull/31580#issuecomment-1069182234 for details Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a test for primary keysJoas Schilling2022-03-101-1/+43
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix column size to work with Oracle. Add unit testsVitor Mattos2022-01-211-2/+9
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Prevent query error when use subqueryVitor Mattos2022-01-211-1/+8
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>