Christoph Wurst
4968328acb
Merge remote-tracking branch 'origin/master' into feat/database/query-result-fetch-associative-fetch-num
2023-10-05 13:29:09 +07:00
Hamid Dehnavi
ea06cf2f39
Convert isset ternary to null coalescing operator
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Christoph Wurst
e1fb2a655f
fixup! feat(database): Add replacements for deprecated fetch and fetchAll
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-27 14:37:19 +07:00
Christoph Wurst
35968f2d91
feat(database): Add replacements for deprecated fetch and fetchAll
...
DBAL deprecated these and will remove them it in the future.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-27 14:36:02 +07:00
Christoph Wurst
6b90ab1953
refactor: Use DBAL's executeQuery instead of query (deprecated)
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-27 10:43:42 +07:00
Robin Appelman
ef87ff1848
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
...
Refactor "substr" calls in lib/private to improve code readability
2023-09-21 16:34:27 +07:00
Anna Larch
56419d94f8
enh(db): provide database providers via API
...
To avoid leaking internals (OC), wrap the getDatabasePlatform and provide the
associated constants
fixes https://github.com/nextcloud/server/issues/30877
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-09-19 11:56:44 +07:00
Côme Chilliet
5c78adb20d
Fix Exception catching in OC\DB\Adapter
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-05 09:20:26 +07:00
Carl Schwan
e966cfbc4b
Cleanup plsam issues in DB/ContactsManager and Console
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-09-05 09:20:26 +07:00
Joas Schilling
0bf738d8cb
feat(db): Ensure that index names are unique across the database
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-20 14:27:26 +07:00
Hamid Dehnavi
d0b20534b9
Refactor "substr" calls to improve code readability
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07:00
Christoph Wurst
14719110b9
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
dartcafe
2211721c2b
fixed quotes
...
Signed-off-by: dartcafe <github@dartcafe.de>
2023-06-20 18:35:10 +07:00
dartcafe
ed294f6e43
add type #38909
...
Signed-off-by: dartcafe <github@dartcafe.de>
2023-06-20 18:35:10 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Julius Härtl
3bdd770129
fix: Check for wrapped retriable exceptions
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-02 19:42:11 +07:00
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Arthur Schiwon
997c2a2a79
fix DBAL exception handling in setValues
...
This seems to be a left over after abstracting DBAL. Nowadays,
IQueryBuilder::executeStatement() only throws a \OCP\DB\Exception, where
previously original DBAL exceptions where thrown. These are now wrapped,
the orignal classes are now mapped to a reason.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-03-31 17:01:17 +07:00
Ferdinand Thiessen
a9af58fd1a
fix(DB): Remove not supported column comments when using SQLite
...
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-22 01:07:26 +07:00
Robin Appelman
426b3429f7
log start time of queries for profiler
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-14 15:16:15 +07:00
Joas Schilling
ecad09b38a
Merge pull request #36261 from nextcloud/techdebt/noid/warn-devs-about-potential-bugs
...
fix(querybuilder): Log a warning if where() is called again on a quer…
2023-01-23 18:47:25 +07: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 +07:00
Joas Schilling
7f0a54c558
fix(querybuilder): Log a warning if where() is called again on a query builder object
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-01-20 07:41:19 +07:00
Côme Chilliet
8a16e7e8a1
Fix more psalm issues in OC\DB
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-21 11:30:20 +07:00
Côme Chilliet
378630f8a0
Fix psalm issues following doctrine/dbal bump
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-21 10:56:15 +07:00
Roeland Jago Douma
d151999fc8
typehint migrationservice closures
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2022-10-09 21:31:27 +07:00
Retidurc Silvernight
2269f35842
Change option name again to be more like the other options
...
Signed-off-by: Retidurc Silvernight <retidurc@silvernight.social>
2022-09-23 09:48:02 +07:00
Retidurc Silvernight
0de8729d7b
Change config option to db.persistent
...
Signed-off-by: Retidurc Silvernight <retidurc@silvernight.social>
2022-09-23 09:48:01 +07:00
Retidurc Silvernight
90f3379dfc
Expose Doctrine settings in Netxcloud settings
...
Signed-off-by: Retidurc Silvernight <retidurc@silvernight.social>
2022-09-23 09:47:56 +07:00
Côme Chilliet
4ac81733bd
Declare strict types in all new Event classes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:15:49 +07:00
Côme Chilliet
a2a7150d6d
Migrate Repair events to OCP\EventDispatcher\Event
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:15:48 +07: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 +07:00
Côme Chilliet
4ba30d40cf
Switch to string keys for argument of GenericEvent for OC\DB\Migrator
...
It seems checkTable is actually never dispatched?
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-25 16:13:46 +07: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 +07:00
Robin Appelman
9b52663a81
Revert "make expression build return IQueryFunction instead of string"
...
This reverts commit 813b50ed42 .
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 12:07:09 +07:00
luz paz
368f83095d
Fix typos in lib/private subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/private`
Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Côme Chilliet
c598e3cafa
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-21 16:36:25 +07:00
Côme Chilliet
1bd5222224
Fix PHP 8.2 warnings about undeclared properties
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-21 16:17:52 +07: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 +07:00
Robin Appelman
813b50ed42
make expression build return IQueryFunction instead of string
...
this allows passing the expressions to further expressions without them being escaped as column names
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 15:52:08 +07:00
Carl Schwan
9ec0cb0a90
Fix psalm issues related to the user backend
...
- Reflect the actual return value returned by the implementation in the
the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
methods. Also helps with getting rid at some point of the old
implementActions
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 17:14:58 +07:00
Robin Appelman
a4e120c203
tell mysql to ignore the sort index for search queries
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 13:42:33 +07:00
Joas Schilling
df36ed4d1a
Log missing primary key until we make it a requirement
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-08 10:47:24 +07:00
Joas Schilling
10b2319aa0
Add missing doc changes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 15:50:33 +07:00
Joas Schilling
82c33be744
Fix typos and empty tabs
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-07 12:42:52 +07:00
John Molakvoæ
0257315c34
Improve error logging on migration failure
...
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-07 11:49:20 +07:00
John Molakvoæ
e20d5fa7fc
Ensure schema change before checking OracleConstraints
...
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-07 11:18:14 +07:00
Robin Appelman
1537c3d23b
record backtrace when profiling db requests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 18:12:30 +07:00
Carl Schwan
135bdb3d58
Merge pull request #30823 from nextcloud/work/profiler
...
Built-in profiler
This adds the required API for collecting information about requests. This information
can then be displayed with the new 'profiler' app.
2022-04-04 12:56:37 +07:00
Carl Schwan
7d272c54d0
Add a built-in profiler inside Nextcloud
...
The webui is provided by a seperate application named profiler
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +07:00