aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB
Commit message (Collapse)AuthorAgeFilesLines
* fix(migration): Correctly sort migrations by version numberJoas Schilling2024-08-271-13/+21
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* 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>
| * | Merge pull request #39247 from nextcloud/query-log-backtraceJohn Molakvoæ2024-05-021-1/+7
| |\ \
| | * | feat: add option to add backtrace to the query loggerRobin Appelman2024-05-011-1/+7
| | | | | | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | | fix(querybuilder): Remove temporary internal method executeUpdate()Joas Schilling2024-04-301-15/+0
| |/ / | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * | fix: Remove bogus code from query builder and fix parameter nameCôme Chilliet2024-04-301-6/+2
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | feat: add request id as comment to all queriesRobin Appelman2024-04-171-8/+20
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | chore(db): move to OCP\ServerGit'Fellow2024-04-131-6/+7
| | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
| * | fix: Fix new psalm errors from updateCôme Chilliet2024-04-083-12/+3
| | | | | | | | | | | | | | | | | | | | | Not sure about the SimpleContainer modification, let’s see what CI says about that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix: Apply new coding standard to all filesCôme Chilliet2024-04-027-10/+10
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Merge pull request #44470 from nextcloud/fix/compatibility-replica-splittingBenjamin Gaussorgues2024-03-261-1/+1
| |\ \
| | * | fix: Allow using replica config with split databasesJulius Härtl2024-03-261-1/+1
| | |/ | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * / fix(DB): Sanitize `host` parameter for postgres databases when IPv6 address ↵Ferdinand Thiessen2024-03-251-0/+9
| |/ | | | | | | | | | | | | | | | | is passed Doctrine is using `pg_connect` with the `host` parameter, this does not allow IPv6 addresses in URI notation. So we need to extract the IP address and pass it directly Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * Merge pull request #43297 from nextcloud/fix/db/dirty-read-cool-offChristoph Wurst2024-02-191-3/+20
| |\ | | | | | | fix(db): Let dirty writes cool off
| | * fix(db): Let dirty writes cool offChristoph Wurst2024-02-191-3/+20
| | | | | | | | | | | | | | | | | | | | | We can assume that after a few seconds a read will be clean again. This is helpful for false warnings in long running processes. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * | fix(db): Give dirty read exception a messageChristoph Wurst2024-02-151-1/+1
| | | | | | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * | fix(db): Unify long transaction log/exception messageChristoph Wurst2024-02-131-1/+1
| | | | | | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
| * | Merge pull request #43357 from nextcloud/enh/41253/fix-occ-upgradeSimon L2024-02-081-10/+49
| | | | | | | | | fix(migration): Make naming constraint fail softer on updates
| * | Revert "Merge branch 'master' of github.com:nextcloud/server"Louis Chemineau2024-02-081-49/+10
| | | | | | | | | | | | | | | This reverts commit d9d60238c7aaab9c61bf2d50c15aa59bc88c8975, reversing changes made to ba3fdb0cdcfbb84f0080a2146a4ba2f01569915d.