diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2021-01-12 15:24:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 15:24:15 +0100 |
commit | 3447ea4955fa4aae6d5f150c3c15923cba0d575f (patch) | |
tree | 5950fd49a73b53ffb13eec2dbbc5998bae27363a | |
parent | e44f275cfedaf1b7934a3ff0d6b8f575a28d9ca6 (diff) | |
parent | c1d4f8161bf46dd6d4a9092c6c73934225c8550b (diff) | |
download | nextcloud-server-3447ea4955fa4aae6d5f150c3c15923cba0d575f.tar.gz nextcloud-server-3447ea4955fa4aae6d5f150c3c15923cba0d575f.zip |
Merge pull request #25089 from nextcloud/enhancement/ocp-db-types
Add our own db column types via the public API
37 files changed, 149 insertions, 34 deletions
diff --git a/apps/dav/lib/Migration/Version1005Date20180413093149.php b/apps/dav/lib/Migration/Version1005Date20180413093149.php index 75bca146a55..e23f2c1b1ad 100644 --- a/apps/dav/lib/Migration/Version1005Date20180413093149.php +++ b/apps/dav/lib/Migration/Version1005Date20180413093149.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1005Date20180530124431.php b/apps/dav/lib/Migration/Version1005Date20180530124431.php index fac9e81dd5f..f75829f1b29 100644 --- a/apps/dav/lib/Migration/Version1005Date20180530124431.php +++ b/apps/dav/lib/Migration/Version1005Date20180530124431.php @@ -27,7 +27,7 @@ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1006Date20180619154313.php b/apps/dav/lib/Migration/Version1006Date20180619154313.php index c333a51b4c1..02e807a3d78 100644 --- a/apps/dav/lib/Migration/Version1006Date20180619154313.php +++ b/apps/dav/lib/Migration/Version1006Date20180619154313.php @@ -26,7 +26,7 @@ */ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1006Date20180628111625.php b/apps/dav/lib/Migration/Version1006Date20180628111625.php index 2f164e4a872..ab278982d1a 100644 --- a/apps/dav/lib/Migration/Version1006Date20180628111625.php +++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1008Date20181030113700.php b/apps/dav/lib/Migration/Version1008Date20181030113700.php index d6e338ce6a3..71b1fc29c2e 100644 --- a/apps/dav/lib/Migration/Version1008Date20181030113700.php +++ b/apps/dav/lib/Migration/Version1008Date20181030113700.php @@ -28,7 +28,7 @@ namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php index e932f8162f8..d229b1f0c3c 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105104826.php +++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/apps/dav/lib/Migration/Version1008Date20181105110300.php b/apps/dav/lib/Migration/Version1008Date20181105110300.php index 13580c96ec1..dd3d5eb6b00 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105110300.php +++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/apps/dav/lib/Migration/Version1011Date20190725113607.php b/apps/dav/lib/Migration/Version1011Date20190725113607.php index f55f134c596..cf23b4f00fa 100644 --- a/apps/dav/lib/Migration/Version1011Date20190725113607.php +++ b/apps/dav/lib/Migration/Version1011Date20190725113607.php @@ -28,7 +28,7 @@ declare(strict_types=1); */ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1011Date20190806104428.php b/apps/dav/lib/Migration/Version1011Date20190806104428.php index f0e7e5de7f4..cf3edb4b695 100644 --- a/apps/dav/lib/Migration/Version1011Date20190806104428.php +++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/dav/lib/Migration/Version1012Date20190808122342.php b/apps/dav/lib/Migration/Version1012Date20190808122342.php index b67f2fb26d7..d3b4304e571 100644 --- a/apps/dav/lib/Migration/Version1012Date20190808122342.php +++ b/apps/dav/lib/Migration/Version1012Date20190808122342.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php index a2891855b55..4bf254fcbd0 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php +++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\FederatedFileSharing\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php index 85da1c0f72b..f59822b8091 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php +++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php @@ -27,7 +27,7 @@ namespace OCA\FederatedFileSharing\Migration; use Closure; use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/apps/federation/lib/Migration/Version1010Date20200630191302.php b/apps/federation/lib/Migration/Version1010Date20200630191302.php index 54b71d993ba..a27e78f76f7 100644 --- a/apps/federation/lib/Migration/Version1010Date20200630191302.php +++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\Federation\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/files_external/lib/Migration/Version1011Date20200630192246.php b/apps/files_external/lib/Migration/Version1011Date20200630192246.php index 0f0ce7c8ce7..73e681ce2d1 100644 --- a/apps/files_external/lib/Migration/Version1011Date20200630192246.php +++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\Files_External\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php index 8094feaef50..250a4f12d7c 100644 --- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php +++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php @@ -29,7 +29,7 @@ namespace OCA\Files_Sharing\Migration; use Closure; use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php index 5dfdb09f1ec..0138d3298e5 100644 --- a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php +++ b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\Files_Sharing\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php index 12cb1d40efd..0ede446fba8 100644 --- a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php +++ b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\Files_Trashbin\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index a53bdd408c0..d732b137199 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -47,7 +47,7 @@ use DirectoryIterator; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\TransactionIsolationLevel; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use GuzzleHttp\Exception\ClientException; use OC; use OC\AppFramework\Http; diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php index f99372d51b9..754200405c8 100644 --- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php +++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\User_LDAP\Migration; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/user_status/lib/Migration/Version0001Date20200602134824.php b/apps/user_status/lib/Migration/Version0001Date20200602134824.php index 4ed8bfe8d65..262c0e5f705 100644 --- a/apps/user_status/lib/Migration/Version0001Date20200602134824.php +++ b/apps/user_status/lib/Migration/Version0001Date20200602134824.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace OCA\UserStatus\Migration; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php index 58458e84c86..e8ce704f9bd 100644 --- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php +++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php @@ -6,7 +6,7 @@ namespace OCA\WorkflowEngine\Migration; use Closure; use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCA\WorkflowEngine\Entity\File; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index 6001de6fb9e..1f71a50cf6b 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -33,7 +33,7 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Types\Type; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OC\DB\Connection; use OC\DB\SchemaWrapper; use Symfony\Component\Console\Command\Command; diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index 32b7492d967..6e20acf254b 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -36,7 +36,7 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Schema\AbstractAsset; use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OC\DB\Connection; use OC\DB\ConnectionFactory; use OC\DB\MigrationService; diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index 686e57acee1..98fea28e015 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -25,7 +25,7 @@ namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index f85b379f89e..4912bef8857 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -30,7 +30,7 @@ namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index 358b9466ff9..e5c57ec2056 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 77a41dc3c4f..76547825b52 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version16000Date20190212081545.php b/core/Migrations/Version16000Date20190212081545.php index db5718868bd..df9087c05a8 100644 --- a/core/Migrations/Version16000Date20190212081545.php +++ b/core/Migrations/Version16000Date20190212081545.php @@ -30,7 +30,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version16000Date20190428150708.php b/core/Migrations/Version16000Date20190428150708.php index 152e754455c..489241546bd 100644 --- a/core/Migrations/Version16000Date20190428150708.php +++ b/core/Migrations/Version16000Date20190428150708.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index dda30193204..4e854ee0c3e 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -31,7 +31,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version18000Date20190920085628.php b/core/Migrations/Version18000Date20190920085628.php index 0e83855d55b..768ade5abbd 100644 --- a/core/Migrations/Version18000Date20190920085628.php +++ b/core/Migrations/Version18000Date20190920085628.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index f78b33b5789..d230173623c 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version20000Date20201109081918.php b/core/Migrations/Version20000Date20201109081918.php index c5a19d0cbfb..35a9f6722a1 100644 --- a/core/Migrations/Version20000Date20201109081918.php +++ b/core/Migrations/Version20000Date20201109081918.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; diff --git a/core/Migrations/Version21000Date20201202095923.php b/core/Migrations/Version21000Date20201202095923.php index 3135a0a664f..c16124a9afb 100644 --- a/core/Migrations/Version21000Date20201202095923.php +++ b/core/Migrations/Version21000Date20201202095923.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Types; +use OCP\DB\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index a69437f1d47..dc5f9dc9e8e 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -171,6 +171,7 @@ return array( 'OCP\\DB\\QueryBuilder\\IParameter' => $baseDir . '/lib/public/DB/QueryBuilder/IParameter.php', 'OCP\\DB\\QueryBuilder\\IQueryBuilder' => $baseDir . '/lib/public/DB/QueryBuilder/IQueryBuilder.php', 'OCP\\DB\\QueryBuilder\\IQueryFunction' => $baseDir . '/lib/public/DB/QueryBuilder/IQueryFunction.php', + 'OCP\\DB\\Types' => $baseDir . '/lib/public/DB/Types.php', 'OCP\\Dashboard\\Exceptions\\DashboardAppNotAvailableException' => $baseDir . '/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php', 'OCP\\Dashboard\\IDashboardManager' => $baseDir . '/lib/public/Dashboard/IDashboardManager.php', 'OCP\\Dashboard\\IDashboardWidget' => $baseDir . '/lib/public/Dashboard/IDashboardWidget.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 4c46c7bc43e..455fb01b18e 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -200,6 +200,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\DB\\QueryBuilder\\IParameter' => __DIR__ . '/../../..' . '/lib/public/DB/QueryBuilder/IParameter.php', 'OCP\\DB\\QueryBuilder\\IQueryBuilder' => __DIR__ . '/../../..' . '/lib/public/DB/QueryBuilder/IQueryBuilder.php', 'OCP\\DB\\QueryBuilder\\IQueryFunction' => __DIR__ . '/../../..' . '/lib/public/DB/QueryBuilder/IQueryFunction.php', + 'OCP\\DB\\Types' => __DIR__ . '/../../..' . '/lib/public/DB/Types.php', 'OCP\\Dashboard\\Exceptions\\DashboardAppNotAvailableException' => __DIR__ . '/../../..' . '/lib/public/Dashboard/Exceptions/DashboardAppNotAvailableException.php', 'OCP\\Dashboard\\IDashboardManager' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IDashboardManager.php', 'OCP\\Dashboard\\IDashboardWidget' => __DIR__ . '/../../..' . '/lib/public/Dashboard/IDashboardWidget.php', diff --git a/lib/public/DB/Types.php b/lib/public/DB/Types.php new file mode 100644 index 00000000000..2fb1c13a529 --- /dev/null +++ b/lib/public/DB/Types.php @@ -0,0 +1,113 @@ +<?php + +declare(strict_types=1); + +/* + * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2021 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace OCP\DB; + +/** + * Database types supported by Nextcloud's DBs + * + * Use these constants instead of \Doctrine\DBAL\Types\Type or \Doctrine\DBAL\Types\Types + * + * @since 21.0.0 + */ +final class Types { + /** + * @var string + * @since 21.0.0 + */ + public const BIGINT = 'bigint'; + + /** + * @var string + * @since 21.0.0 + */ + public const BINARY = 'binary'; + + /** + * @var string + * @since 21.0.0 + */ + public const BLOB = 'blob'; + + /** + * @var string + * @since 21.0.0 + */ + public const BOOLEAN = 'boolean'; + + /** + * @var string + * @since 21.0.0 + */ + public const DATE = 'date'; + + /** + * @var string + * @since 21.0.0 + */ + public const DATETIME = 'datetime'; + + /** + * @var string + * @since 21.0.0 + */ + public const DECIMAL = 'decimal'; + + /** + * @var string + * @since 21.0.0 + */ + public const FLOAT = 'float'; + + /** + * @var string + * @since 21.0.0 + */ + public const INTEGER = 'integer'; + + /** + * @var string + * @since 21.0.0 + */ + public const SMALLINT = 'smallint'; + + /** + * @var string + * @since 21.0.0 + */ + public const STRING = 'string'; + + /** + * @var string + * @since 21.0.0 + */ + public const TEXT = 'text'; + + /** + * @var string + * @since 21.0.0 + */ + public const TIME = 'time'; +} |