Skip to content

Commit acdcd2f

Browse files
lscharmermjansenDatabay
authored andcommitted
Database: Flatten field definition
1 parent b444a8d commit acdcd2f

7 files changed

Lines changed: 1355 additions & 1776 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
/**
4+
* This file is part of ILIAS, a powerful learning management system
5+
* published by ILIAS open source e-Learning e.V.
6+
*
7+
* ILIAS is licensed with the GPL-3.0,
8+
* see https://www.gnu.org/licenses/gpl-3.0.en.html
9+
* You should have received a copy of said license along with the
10+
* source code, too.
11+
*
12+
* If this is not the case or you just want to try ILIAS, you'll find
13+
* us at:
14+
* https://www.ilias.de
15+
* https://github.com/ILIAS-eLearning
16+
*
17+
*********************************************************************/
18+
19+
declare(strict_types=1);
20+
21+
namespace ILIAS\Database;
22+
23+
interface FieldDefinition
24+
{
25+
public const INDEX_FORMAT = '%s_idx';
26+
public const SEQUENCE_COLUMNS_NAME = 'sequence';
27+
public const SEQUENCE_FORMAT = '%s_seq';
28+
public const T_BLOB = 'blob';
29+
public const T_CLOB = 'clob';
30+
public const T_DATE = 'date';
31+
public const T_DATETIME = 'datetime';
32+
public const T_FLOAT = 'float';
33+
public const T_INTEGER = 'integer';
34+
public const T_TEXT = 'text';
35+
public const T_TIME = 'time';
36+
public const T_TIMESTAMP = 'timestamp';
37+
38+
public function checkTableName(string $table_name): bool;
39+
public function isReserved(string $table_name): bool;
40+
public function getAllReserved(): array;
41+
public function getReservedMysql(): array;
42+
public function setReservedMysql(array $reserved_mysql): void;
43+
public function checkColumnName(string $column_name): bool;
44+
public function checkIndexName(string $a_name): bool;
45+
public function checkColumnDefinition(array $a_def): bool;
46+
public function isAllowedAttribute(string $attribute, string $type): bool;
47+
public function getAvailableTypes(): array;
48+
public function setAvailableTypes(array $available_types): void;
49+
public function getAllowedAttributes(): array;
50+
public function setAllowedAttributes(array $allowed_attributes): void;
51+
public function getMaxLength(): array;
52+
public function setMaxLength(array $max_length): void;
53+
public function getValidTypes(): array;
54+
public function getDeclaration(string $type, string $name, array $field);
55+
public function getTypeDeclaration(array $field): string;
56+
public function compareDefinition(array $current, array $previous): array;
57+
public function quote($value, ?string $type = null, bool $quote = true, bool $escape_wildcards = false): string;
58+
public function writeLOBToFile($lob, string $file): bool;
59+
public function destroyLOB($lob): bool;
60+
public function matchPattern(array $pattern, $operator = null, $field = null): string;
61+
public function patternEscapeString(): string;
62+
public function mapNativeDatatype(array $field);
63+
public function mapPrepareDatatype(string $type);
64+
}

0 commit comments

Comments
 (0)