@@ -19,7 +19,7 @@ interface Driver
19
19
SupportSequence = 'sequence ' ,
20
20
SupportSelectUngroupedColumns = 'ungrouped_cols ' ,
21
21
SupportMultiInsertAsSelect = 'insert_as_select ' ,
22
- SupportMultiColumnAsOrCond = 'multi_column_as_or ' ,
22
+ SupportMultiColumnAsOrCondition = 'multi_column_as_or ' ,
23
23
SupportSubselect = 'subselect ' ,
24
24
SupportSchema = 'schema ' ;
25
25
@@ -32,6 +32,12 @@ interface Driver
32
32
SUPPORT_SUBSELECT = 'subselect ' ,
33
33
SUPPORT_SCHEMA = 'schema ' ;
34
34
35
+ /**
36
+ * Checks if the engine supports a specific feature.
37
+ * @param self::Support* $feature
38
+ */
39
+ function isSupported (string $ feature ): bool ;
40
+
35
41
/**
36
42
* Initializes connection.
37
43
*/
@@ -42,56 +48,54 @@ function initialize(Connection $connection, array $options): void;
42
48
*/
43
49
function convertException (\PDOException $ e ): DriverException ;
44
50
45
- /**
46
- * Delimites identifier for use in a SQL statement.
47
- */
51
+ /********************* SQL utilities ****************d*g**/
52
+
53
+ /** Escapes an identifier for use in an SQL statement. */
48
54
function delimite (string $ name ): string ;
49
55
50
- /**
51
- * Formats date-time for use in a SQL statement.
52
- */
56
+ /** Formats a date-time value for use in an SQL statement. */
53
57
function formatDateTime (\DateTimeInterface $ value ): string ;
54
58
55
- /**
56
- * Formats date-time interval for use in a SQL statement.
57
- */
59
+ /** Formats a date-time interval for use in an SQL statement. */
58
60
function formatDateInterval (\DateInterval $ value ): string ;
59
61
60
- /**
61
- * Encodes string for use in a LIKE statement.
62
- */
62
+ /** Encodes string for use in a LIKE statement. */
63
63
function formatLike (string $ value , int $ pos ): string ;
64
64
65
- /**
66
- * Injects LIMIT/OFFSET to the SQL query.
67
- */
65
+ /** Applies LIMIT and OFFSET clauses to an SQL query. */
68
66
function applyLimit (string &$ sql , ?int $ limit , ?int $ offset ): void ;
69
67
70
68
/********************* reflection ****************d*g**/
71
69
72
- /** @return list<array{name: string, fullName: string, view: bool}> */
70
+ /**
71
+ * Returns a list of all tables in the database.
72
+ * @return list<array{name: string, fullName: string, view: bool}>
73
+ */
73
74
function getTables (): array ;
74
75
75
- /** @return list<array{name: string, table: string, nativetype: string, size: int|null, nullable: bool, default: mixed, autoincrement: bool, primary: bool, vendor: array}> */
76
+ /**
77
+ * Returns detailed information about columns in a table.
78
+ * @return list<array{name: string, table: string, nativetype: string, size: int|null, nullable: bool, default: mixed, autoincrement: bool, primary: bool, vendor: array}>
79
+ */
76
80
function getColumns (string $ table ): array ;
77
81
78
- /** @return list<array{name: string, columns: list<string>, unique: bool, primary: bool}> */
82
+ /**
83
+ * Returns information about indexes in a table.
84
+ * @return list<array{name: string, columns: list<string>, unique: bool, primary: bool}>
85
+ */
79
86
function getIndexes (string $ table ): array ;
80
87
81
- /** @return list<array{name: string, local: string, table: string, foreign: string}> */
88
+ /**
89
+ * Returns information about foreign keys in a table.
90
+ * @return list<array{name: string, local: string, table: string, foreign: string}>
91
+ */
82
92
function getForeignKeys (string $ table ): array ;
83
93
84
94
/**
85
95
* Returns associative array of detected types (IStructure::FIELD_*) in result set.
86
96
* @return array<string, string>
87
97
*/
88
98
function getColumnTypes (\PDOStatement $ statement ): array ;
89
-
90
- /**
91
- * Cheks if driver supports specific property
92
- * @param self::Support* $item
93
- */
94
- function isSupported (string $ item ): bool ;
95
99
}
96
100
97
101
0 commit comments