Côme Chilliet
70e2217d1c
Fix dynamic properties and other problems in tests for PHP 8.2
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Côme Chilliet
a83a8f0dde
Migrate Migrator::executeSql to OCP\EventDispatcher\Event
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Robin Appelman
6e0123a1d0
Revert "add case statement to sql function builder"
This reverts commit 2a68819a67 .
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Côme Chilliet
6a1510f8ee
Remove some more at matchers in tests/lib
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Robin Appelman
2a68819a67
add case statement to sql function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Carl Schwan
7817845538
Add a metadata service to store file metadata
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Joas Schilling
129bae62d4
Ensure string column limit of 4.000 characters
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>
4 years ago
Côme Chilliet
bfd09a0669
Avoid select with no FROM clause for Oracle in tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Côme Chilliet
efebbacca4
Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Côme Chilliet
61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Joas Schilling
89e293d3fd
Test disabled for now due to multiple reasons
see https://github.com/nextcloud/server/pull/31580#issuecomment-1069182234 for details
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
1970d3dc9a
Add a test for primary keys
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Vitor Mattos
b6d9e0542d
Fix column size to work with Oracle. Add unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
4 years ago
Vitor Mattos
afe5b6dd8a
Prevent query error when use subquery
Signed-off-by: Vitor Mattos <vitor@php.rio>
4 years ago
Carl Schwan
6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Vitor Mattos
f732cf1b04
Unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
4 years ago
Joas Schilling
46ad6fa3c7
Add a test with integer
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
43fa2d5c8c
Test with real data
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Vitor Mattos
fb6a9f308d
Add unit test
Signed-off-by: Vitor Mattos <vitor@php.rio>
4 years ago
Vitor Mattos
7b9fea85b6
Add unit test and orderBy parameter
Signed-off-by: Vitor Mattos <vitor@php.rio>
4 years ago
Christoph Wurst
130ab63ca1
Bump doctrine/dbal from 3.0.0 to 3.1.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling
11d21e5f5c
Add a unit test to check for casting a IQueryFunction
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
1670d00452
Integer 0 is not stored as Null and therefor works
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
8b4ecdcc88
Test that oracle throws on EmptyValues in a NotNull columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
e88bad4b0a
Run migrator tests on OCI
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
f9d4fa2d38
Rename the method to match what it does
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
3696ef5b96
Don't allow Notnull for boolean columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Morris Jobke
ab48d5e8cb
Cleanup unneeded code around database.xml
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Julius Härtl
a2f3077ee8
Skip db migration simulation for core schema changes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Daniel Kesselberg
b68c3a5836
Add test for dbal exception wrapping
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 years ago
Joas Schilling
2d34ca4143
Only rollback when not MySQL
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Arthur Schiwon
f9484d15cb
DB: warn on parameter number constraints
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Julius Härtl
4f927721b2
Add temporary test for migrating int to string
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
Robin Appelman
a61a757b85
allow selecting multiple columns with SELECT DISTINCT
Signed-off-by: Robin Appelman <robin@icewind.nl>
5 years ago
Joas Schilling
0c695d97ec
Fix unique key in test table
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
61c767128c
Skip the insertIfNotExists() tests on Oracle because it doesn't work with clob
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
74c0143001
Easier debugging and spell fix
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
e313777cd6
Use a different column for the primary key as we can not insert it on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Julius Härtl
2050517d44
Add github action for oci8
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
Joas Schilling
8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Morris Jobke
e4144e6b36
Remove deprecated test of internal attributes via assertAttributeEquals
See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322
It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 years ago
Daniel Kesselberg
87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 years ago
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
c68718f90c
Remove dropped " ON " when join has no condition
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
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>
6 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago