summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
Commit message (Collapse)AuthorAgeFilesLines
* add case statement to sql function builderRobin Appelman2022-06-021-0/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* make expression build return IQueryFunction instead of stringRobin Appelman2022-06-026-85/+92
| | | | | | this allows passing the expressions to further expressions without them being escaped as column names Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix psalm issues related to the user backendCarl Schwan2022-05-201-1/+1
| | | | | | | | | | | | | - 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>
* tell mysql to ignore the sort index for search queriesRobin Appelman2022-04-221-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Log missing primary key until we make it a requirementJoas Schilling2022-04-081-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add missing doc changesJoas Schilling2022-04-071-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix typos and empty tabsJoas Schilling2022-04-071-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Improve error logging on migration failureJohn Molakvoæ2022-04-071-4/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Ensure schema change before checking OracleConstraintsJohn Molakvoæ2022-04-071-12/+23
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* record backtrace when profiling db requestsRobin Appelman2022-04-043-5/+37
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #30823 from nextcloud/work/profilerCarl Schwan2022-04-043-0/+240
|\ | | | | | | | | | | Built-in profiler This adds the required API for collecting information about requests. This information can then be displayed with the new 'profiler' app.
| * Add a built-in profiler inside NextcloudCarl Schwan2022-04-043-0/+240
| | | | | | | | | | | | The webui is provided by a seperate application named profiler Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Merge pull request #31679 from ↵Côme Chilliet2022-03-311-0/+4
|\ \ | |/ |/| | | | | 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/+4
| | | | | | | | | | | | 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-293-52/+46
|\ \ | | | | | | Migrate from ILogger to LoggerInterface in lib/private
| * | Fix log level for exception in QueryBuilderCôme Chilliet2022-03-241-1/+1
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-242-36/+36
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-16/+10
| |/ | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix LENGTH function name across databasesCôme Chilliet2022-03-283-1/+13
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Use OCTET_LENGTH which is more common than LENGTHBCôme Chilliet2022-03-242-1/+7
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Add octetLength and charLength to function builder, and testsCôme Chilliet2022-03-242-0/+18
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-idJoas Schilling2022-03-221-2/+8
|\ | | | | Extract request id handling to dedicated class so it can be injected without DB dependency
| * Allow to prefix the Query log with the request idJoas Schilling2022-02-231-2/+8
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Disable for now again until more apps are fixedJoas Schilling2022-03-211-2/+2
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Limit missing primary key fail to new tablesJoas Schilling2022-03-211-1/+1
| | | | | | | | | | | | | | This will work on CI so devs notice it when they install the app for testing, and at the same time existing faulty tables don't break the upgrade to 24 Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Enforce primary keys as they are required to be performant in MySQL clustersJoas Schilling2022-03-101-0/+2
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add event logging for db and redis connectionJulius Härtl2022-02-281-1/+11
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Add --dry-run option for db:add-missing-* cmdLouis Chemineau2022-02-241-2/+10
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Allow specify a config prefix for another database connectionJoas Schilling2022-02-031-6/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #30379 from nextcloud/feature/add-comments-reactionsJoas Schilling2022-01-211-2/+2
|\ | | | | Add comments reactions
| * Remove order from groupConcat as it is not working everywhereJoas Schilling2022-01-214-5/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Fix groupConcat and ordering on OracleVitor Mattos2022-01-214-5/+5
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
| * Prevent query error when use subqueryVitor Mattos2022-01-211-2/+2
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Merge pull request #30471 from nextcloud/enh/cast-char-mysqlJoas Schilling2022-01-204-0/+22
|\ \ | |/ |/| Explicitly cast char in the query builder
| * Fix psalm complaintJoas Schilling2022-01-041-0/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Explicitly cast char in the query builderJulius Härtl2022-01-043-0/+21
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #30129 from nextcloud/mdb10.6-pipelineJohn Molakvoæ2022-01-191-1/+0
|\ \
| * | Attempt to fix CIacsfer2021-12-071-1/+0
| | |
* | | Merge pull request #30508 from nextcloud/fix/psaml-binCarl Schwan2022-01-132-2/+2
|\ \ \ | | | | | | | | Fix psalm not running
| * | | Check style updateCarl Schwan2022-01-132-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | | | Unit testsVitor Mattos2022-01-071-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | | | Accept multipe args on concatVitor Mattos2022-01-064-6/+30
|/ / / | | | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | | Use quote functionJoas Schilling2022-01-041-6/+2
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Try escaping Oracle single quotesJoas Schilling2022-01-041-1/+1
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Add a test with integerJoas Schilling2022-01-045-16/+26
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix oracle LISTAGGJoas Schilling2022-01-031-1/+1
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Add unit testVitor Mattos2022-01-034-23/+11
| | | | | | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | | Add unit test and orderBy parameterVitor Mattos2022-01-035-13/+38
| | | | | | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | | Add group_concat aggregator functionVitor Mattos2022-01-033-0/+18
| |/ |/| | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Check if directoy is writable instead of possibly missing fileCarl Schwan2021-12-201-1/+1
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>