aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB
Commit message (Collapse)AuthorAgeFilesLines
* fix: Adjust types of IQueryBuilder to properly allow joining with sub-queryFerdinand Thiessen2024-09-102-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-2/+2
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Merge pull request #47675 from nextcloud/adapterQueryOptiJohn Molakvoæ2024-09-041-12/+12
|\
| * fix: psalmGit'Fellow2024-09-021-1/+1
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
| * fix: psalmGit'Fellow2024-09-021-2/+2
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
| * chore(db): Make the query more simpler to readGit'Fellow2024-09-021-14/+14
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | Merge pull request #47640 from nextcloud/fix/migrator-replicaJulius Härtl2024-09-021-1/+1
|\ \ | |/ |/| fix: Run migration sql as statement so that the primary db node is used
| * fix: Run migration sql as statement so that the primary db node is usedJulius Härtl2024-08-301-1/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | fix(DB): do not assume sharding is always enabledArthur Schiwon2024-08-291-13/+19
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix(DB): set sharding parameters only when intendedArthur Schiwon2024-08-291-5/+10
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #47515 from nextcloud/bugfix/noid/fix-migration-sortingAndy Scherzinger2024-08-281-13/+21
|\ | | | | fix(migration): Correctly sort migrations by version number
| * fix(migration): Correctly sort migrations by version numberJoas Schilling2024-08-271-13/+21
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | chore: Apply php:cs recommendationsLouis Chemineau2024-08-288-30/+30
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix: implement sharding compatible cleanup for various bitsRobin Appelman2024-08-283-4/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: only allow pre-defined shardsRobin Appelman2024-08-281-8/+30
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-2818-21/+1247
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat: add option to automatically partition queries by specific tablesRobin Appelman2024-08-289-2/+970
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat: track expected output columns in query builderRobin Appelman2024-08-282-0/+33
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(db): Increase log level for very slow transactionsChristoph Wurst2024-08-271-2/+29
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-2512-47/+47
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat: expose escapeLikeParameter trough query builderRobin Appelman2024-08-231-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: fix passing additional db connection parameters in factoryRobin Appelman2024-07-311-25/+20
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #44788 from nextcloud/db-error-loggingStephan Orbaugh2024-07-253-4/+52
|\ | | | | feat: add additional logging for database errors
| * feat: add additional logging for database errorsRobin Appelman2024-07-243-4/+52
| | | | | | | | | | | | including the stack trace of the current database transaction Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: cast to bigint on postgresqlRobin Appelman2024-07-231-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(db): Fix md5 for oracle >= 20Joas Schilling2024-07-194-1/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Manually track if `where()` is called when not empty to avoid recursionJoas Schilling2024-07-191-19/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `IExpressionBuilder::or()` and ↵Joas Schilling2024-07-194-28/+30
| | | | | | `IExpressionBuilder::and()` without parameters Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `getState()` as per upstreamJoas Schilling2024-07-191-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-194-51/+40
| | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate using table alias for DELETE and UPDATEJoas Schilling2024-07-191-0/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): `Doctrine\DBAL\Connection::executeUpdate()` is deprecatedJoas Schilling2024-07-191-4/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Fix internal calls to doctrine's `fetch()` methodsJoas Schilling2024-07-191-5/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Use `createSchemaManager()` method as `getSchemaManager()` is ↵Joas Schilling2024-07-193-5/+5
| | | | | | deprecated Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Deprecate `getQueryPart()` and `resetQueryPart()` methods that will ↵Joas Schilling2024-07-191-0/+12
| | | | | | be removed with Doctrine/DBAL 4 Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat: allow running QueryBuilder queries on different connectionsRobin Appelman2024-07-152-41/+50
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #46397 from nextcloud/extended-query-builder-baseRobin Appelman2024-07-151-0/+290
|\ | | | | feat: add base class for extending the query builder
| * feat: add base class for extending the query builderRobin Appelman2024-07-121-0/+290
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat: allow inspecting the parts of the composite expression builderRobin Appelman2024-07-122-18/+31
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add commands for exporting current and expected database schemaRobin Appelman2024-07-022-3/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat(dbal): add proper insert ignore conflict method for SQLiteBenjamin Gaussorgues2024-06-251-0/+15
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(dbal): add proper insert ignore conflict method for MySQLBenjamin Gaussorgues2024-06-251-0/+28
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(db): remove workaround for pqsql 9.4 and olderDaniel Kesselberg2024-06-031-18/+0
| | | | | | | | The workaround was required because "ON CONFLICT DO NOTHING" was added with pqsql 9.5. PostgreSQL 9.4 is eol since 2020-02-13 and thus everyone should use a version with upsert support nowadays. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge branch 'master' into refactor/OC-Server-getSecureRandomJohn Molakvoæ2024-05-3047-1456/+645
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * feat(db): add mapping for lock wait timeoutDaniel Kesselberg2024-05-291-0/+4
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
| * fix(db): Prevent two connections for single node databasesChristoph Wurst2024-05-281-1/+11
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * Merge pull request #39589 from ↵Thomas Citharel2024-05-271-0/+2
| |\ | | | | | | | | | | | | nextcloud/enh/set-nest-transactions-with-savepoints set Doctrine to use nest transactions with savepoints
| | * feat(db): set Doctrine to use nest transactions with savepointsThomas Citharel2024-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using nested transactions without savepoints is actually deprecated by Doctrine: https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting Without savepoints, a nested transaction can be rollbacked but not handled properly in the "real" transaction, leading to the following error: Transaction commit failed because the transaction has been marked for rollback only. Ref https://github.com/nextcloud/server/pull/36528#issuecomment-1639913965 (and possibly) https://github.com/nextcloud/server/issues/38902#issuecomment-1598075391 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * | fix(db): Log loong transaction times at debug levelJosh2024-05-251-2/+2
| | | | | | | | | Signed-off-by: Josh <josh.t.richards@gmail.com>
| * | chore: Add SPDX headerAndy Scherzinger2024-05-2445-945/+141
| | | | | | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>