Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling
720dc4e93d
Add optional column oc_comments.reference_id
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
5fc4c91a76
Fix mismatching doc block parameter types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Daniel Kesselberg
9e699a8d21
Add event subscriber for transaction isolation level
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Joas Schilling
059968e1c7
Pick a shorter name for the transfer ownership table
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Robin Appelman
9e450d727a
add LEAST and GREATER to db function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Daniel Kesselberg
9cb7252880
Connection::TRANSACTION_READ_COMMITTED is deprecated
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 years ago
Robin Appelman
ac209cea52
add count() as shortcut for count('*') in FunctionBuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Robin Appelman
0e9feeb090
return from QueryBuilder instead of IQueryBuilder
this make the type hints work properly with querybuilder subclasses
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Robin Appelman
8ef5a366ec
add MAX and MIN to functionbuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Arthur Schiwon
d0409548c6
instead of upsert, fallback to default query on PgSQL <= 9.4
because there is no upsert yet
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 years ago
Christoph Wurst
3174012adf
Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Roeland Jago Douma
d11caf1a3a
No need for platform hacks anymore
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Joas Schilling
b3e6cbc4c5
Remove the custom prefix from the table name length when checking on the default primary index
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
f906913177
Allow to use Subqueries in from
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
f557e1e214
Indeces, columns and sequences don't have the table prefix
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Morris Jobke
f889beae7e
Fix PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Ole Ostergaard
0d778fcc4e
Code cleanup.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
5 years ago
Ole Ostergaard
d62da82bf9
Add supression of SqlInjectionChecker.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
5 years ago
Ole Ostergaard
c9b6487393
Add PostgreSQL specific implementation for includeIgnoreConflict.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
5 years ago
Ole Ostergaard
a48ea8cffa
Add insertIgnoreConflict to Adapter and use it for for executing the file locking.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
5 years ago
Robin Appelman
bfd539017f
add casting to string for postgresql query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Joas Schilling
c09fa1ee65
Only check the Oracle schema conditions if the app supports it
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
f265657bc6
Only check changed items
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Morris Jobke
5273639d0e
Add deprecation message ofr insertIfNotExist
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
230e93f575
Catch UniqueConstraintViolationException inside insertIfNotExist
This is the most common case for the usage of this method.
See also https://github.com/nextcloud/server/issues/12369 and the linked tickets.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Daniel Kesselberg
0ee191bf44
Use const for dbname and dbtableprefix defaults
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 years ago
Joas Schilling
f5c63d7a6e
Disable Oracle enforcement for now until the following issues are solved:
* Only apps should be checked which say they support oracle
* Only check newly added items, to allow forward migration from an existing database structure
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
ef5074adaa
Fix primary key handling on postgres
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
008c8dde1a
Ignore custom prefixes which are longer
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
5e0bfe5c16
Ignore automatic generated sequences
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
960961148e
Fix calculation of default name
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
8a45cb1d20
Prevent too long identifier names
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
891de38080
Only create the schema when moving between databases
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
011fe9e0f9
MySQL 8.0+ and MariaDB 10.3+ are large prefix and barracuda by default
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Robin Appelman
3047ef31bd
Add count to function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Morris Jobke
624d191ef6
Fix wrong hint about missing indexes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
393d9aae74
Add a hint that some indexes are not added yet
* gives the admin a chance to discover the missing indexes and improve the performance of the instance without digging through the manual
* nicely integrated in the setup checks where this kind of hints belong to
* also adds an option to integrate this from an app based on events
* fix style of setting warnings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Robin Appelman
b40629ac8c
Add human readable description to migration steps
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Robin Appelman
335619f6a4
Check connection status and attempt to reconnect each each minute
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Joas Schilling
78ee3abb78
Move regex to a function and add tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
8f7a0af951
Allow IPv6 database hosts
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Robin Appelman
89a9d35d90
dont keep shared database locks when running cli scripts
For cli scripts we don't have the assumption that the universe will be cleaned up soon
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Roeland Jago Douma
ab04f3cb19
Fix Array to String conversion in QueryBuilder
Fixes #9080
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
46c195b58b
Made IExpressionBuilder varadic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago