Commit Graph

158 Commits

Author SHA1 Message Date
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Roeland Jago Douma cbcf072b23
Revert "Make sure MySQL is not saying 'this' = 'this ' is true" 2020-04-15 23:49:16 +02:00
Joas Schilling 16e9bf2309
Make sure MySQL is not saying 'this' = 'this ' is true
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-15 09:14:12 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Joas Schilling bc6a5ef5c4
Merge pull request #19890 from nextcloud/enh/comments-reference-id
Add optional comments reference_id
2020-04-02 11:34:21 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Joas Schilling 720dc4e93d
Add optional column oc_comments.reference_id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:15 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst 5fc4c91a76
Fix mismatching doc block parameter types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-06 16:28:42 +01:00
Daniel Kesselberg 9e699a8d21
Add event subscriber for transaction isolation level
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-21 09:59:08 +01:00
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>
2019-12-10 11:01:26 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 76b78edd40
Merge pull request #17833 from nextcloud/propagator-no-negative-sizes
dont set folder size to negative values during propagation
2019-12-04 11:49:26 +01:00
Joas Schilling 19935a6a26
Merge pull request #17949 from nextcloud/debt/deprecated-const
Connection::TRANSACTION_READ_COMMITTED is deprecated
2019-12-04 09:49:41 +01:00
Robin Appelman 9e450d727a
add LEAST and GREATER to db function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-26 12:05:30 +01:00
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>
2019-11-22 20:52:10 +01:00
Daniel Kesselberg 9cb7252880
Connection::TRANSACTION_READ_COMMITTED is deprecated
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-11-14 20:17:27 +01:00
Robin Appelman ac209cea52
add count() as shortcut for count('*') in FunctionBuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 11:30:32 +01:00
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>
2019-11-13 11:30:27 +01:00
Robin Appelman 8ef5a366ec
add MAX and MIN to functionbuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-09-06 12:28:17 +02:00
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>
2019-08-14 09:05:11 +02:00
Christoph Wurst 3174012adf Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-06-25 10:02:27 +02:00
Roeland Jago Douma d11caf1a3a
No need for platform hacks anymore
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-05-14 12:24:43 +02:00
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>
2019-04-30 12:08:52 +02:00
Joas Schilling f906913177
Allow to use Subqueries in from
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-04-16 15:42:21 +02:00
Joas Schilling f557e1e214
Indeces, columns and sequences don't have the table prefix
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-28 14:51:11 +01:00
Morris Jobke f889beae7e
Fix PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-21 17:05:57 +01:00
Ole Ostergaard 0d778fcc4e Code cleanup.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
2019-03-21 11:42:00 +01:00
Ole Ostergaard d62da82bf9 Add supression of SqlInjectionChecker.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
2019-03-21 11:42:00 +01:00
Ole Ostergaard c9b6487393 Add PostgreSQL specific implementation for includeIgnoreConflict.
Signed-off-by: Ole Ostergaard <ole.c.ostergaard@gmail.com>
2019-03-21 11:42:00 +01:00
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>
2019-03-21 11:42:00 +01:00
Robin Appelman bfd539017f
add casting to string for postgresql query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-03-14 14:19:10 +01:00
Joas Schilling c09fa1ee65
Only check the Oracle schema conditions if the app supports it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-12-17 13:52:08 +01:00
Joas Schilling f265657bc6
Only check changed items
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-12-17 13:52:08 +01:00
Morris Jobke fd8eeccb15
Merge pull request #11942 from nextcloud/techdebt/noid/use-count-function
Use the defined func()->count() instead of manual counting
2018-11-12 17:43:56 +01:00
Morris Jobke 5273639d0e
Add deprecation message ofr insertIfNotExist
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-09 12:13:30 +01:00
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>
2018-11-09 10:38:20 +01:00
Joas Schilling bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +01:00
Daniel Kesselberg 0ee191bf44
Use const for dbname and dbtableprefix defaults
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-23 18:15:57 +02:00
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>
2018-08-06 17:34:40 +02:00