‪TYPO3CMS  ‪main
MockPostgreSQLPlatform.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use ‪TYPO3\CMS\Core\Database\Platform\PostgreSQLPlatform as Typo3PostgreSQLPlatform;
22 
23 class ‪MockPostgreSQLPlatform extends Typo3PostgreSQLPlatform
24 {
31  public function ‪getBlobTypeDeclarationSQL(array $field): string
32  {
33  return '';
34  }
35 
39  public function ‪getBooleanTypeDeclarationSQL(array $columnDef): string
40  {
41  return '';
42  }
43 
47  public function ‪getIntegerTypeDeclarationSQL(array $columnDef): string
48  {
49  return '';
50  }
51 
55  public function ‪getBigIntTypeDeclarationSQL(array $columnDef): string
56  {
57  return '';
58  }
59 
63  public function ‪getSmallIntTypeDeclarationSQL(array $columnDef): string
64  {
65  return '';
66  }
67 
71  public function ‪_getCommonIntegerTypeDeclarationSQL(array $columnDef): string
72  {
73  return '';
74  }
75 
79  public function ‪getVarcharTypeDeclarationSQL(array $field): string
80  {
81  return 'DUMMYVARCHAR()';
82  }
83 
87  public function ‪getClobTypeDeclarationSQL(array $field): string
88  {
89  return 'DUMMYCLOB';
90  }
91 
100  public function ‪getJsonTypeDeclarationSQL(array $field): string
101  {
102  return 'DUMMYJSON';
103  }
104 
110  public function ‪getBinaryTypeDeclarationSQL(array $field): string
111  {
112  return 'DUMMYBINARY';
113  }
114 
118  protected function ‪initializeDoctrineTypeMappings(): void {}
119 
127  protected function ‪getVarcharTypeDeclarationSQLSnippet($length): string
128  {
129  return '';
130  }
131 
138  protected function ‪getReservedKeywordsClass(): string
139  {
140  return MockKeywordList::class;
141  }
142 
143  public function ‪getCurrentDatabaseExpression(): string
144  {
145  return "''";
146  }
147 }
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getSmallIntTypeDeclarationSQL
‪getSmallIntTypeDeclarationSQL(array $columnDef)
Definition: MockPostgreSQLPlatform.php:63
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\initializeDoctrineTypeMappings
‪initializeDoctrineTypeMappings()
Definition: MockPostgreSQLPlatform.php:118
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockKeywordList
Definition: MockKeywordList.php:23
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getBooleanTypeDeclarationSQL
‪getBooleanTypeDeclarationSQL(array $columnDef)
Definition: MockPostgreSQLPlatform.php:39
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getCurrentDatabaseExpression
‪getCurrentDatabaseExpression()
Definition: MockPostgreSQLPlatform.php:143
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform
Definition: MockPostgreSQLPlatform.php:24
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getBlobTypeDeclarationSQL
‪string getBlobTypeDeclarationSQL(array $field)
Definition: MockPostgreSQLPlatform.php:31
‪TYPO3\CMS\Core\Database\Platform\PostgreSQLPlatform
Definition: PostgreSQLPlatform.php:31
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\_getCommonIntegerTypeDeclarationSQL
‪_getCommonIntegerTypeDeclarationSQL(array $columnDef)
Definition: MockPostgreSQLPlatform.php:71
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getIntegerTypeDeclarationSQL
‪getIntegerTypeDeclarationSQL(array $columnDef)
Definition: MockPostgreSQLPlatform.php:47
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getClobTypeDeclarationSQL
‪getClobTypeDeclarationSQL(array $field)
Definition: MockPostgreSQLPlatform.php:87
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getJsonTypeDeclarationSQL
‪getJsonTypeDeclarationSQL(array $field)
Definition: MockPostgreSQLPlatform.php:100
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform
Definition: MockMariaDBPlatform.php:18
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getVarcharTypeDeclarationSQL
‪getVarcharTypeDeclarationSQL(array $field)
Definition: MockPostgreSQLPlatform.php:79
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getBinaryTypeDeclarationSQL
‪getBinaryTypeDeclarationSQL(array $field)
Definition: MockPostgreSQLPlatform.php:110
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getReservedKeywordsClass
‪getReservedKeywordsClass()
Definition: MockPostgreSQLPlatform.php:138
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getVarcharTypeDeclarationSQLSnippet
‪string getVarcharTypeDeclarationSQLSnippet($length)
Definition: MockPostgreSQLPlatform.php:127
‪TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform\MockPostgreSQLPlatform\getBigIntTypeDeclarationSQL
‪getBigIntTypeDeclarationSQL(array $columnDef)
Definition: MockPostgreSQLPlatform.php:55