1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Yiisoft\Db\Tests\Support\Stubs; |
6
|
|
|
|
7
|
|
|
use Yiisoft\Db\Cache\SchemaCache; |
8
|
|
|
use Yiisoft\Db\Connection\ConnectionInterface; |
9
|
|
|
use Yiisoft\Db\Constraint\Constraint; |
10
|
|
|
use Yiisoft\Db\Schema\ColumnSchemaBuilder; |
11
|
|
|
use Yiisoft\Db\Schema\SchemaInterface; |
12
|
|
|
use Yiisoft\Db\Schema\TableSchemaInterface; |
13
|
|
|
|
14
|
|
|
final class Schema extends \Yiisoft\Db\Schema\Schema implements SchemaInterface |
15
|
|
|
{ |
16
|
|
|
public function __construct(ConnectionInterface $connection, SchemaCache $schemaCache) |
17
|
|
|
{ |
18
|
|
|
parent::__construct($connection, $schemaCache); |
19
|
|
|
} |
20
|
|
|
|
21
|
|
|
public function createColumnSchemaBuilder(string $type, array|int|string $length = null): ColumnSchemaBuilder |
22
|
|
|
{ |
23
|
|
|
return new ColumnSchemaBuilder($type, $length); |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
public function findUniqueIndexes(TableSchemaInterface $table): array |
27
|
|
|
{ |
28
|
|
|
return []; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
public function getLastInsertID(string $sequenceName = null): string |
32
|
|
|
{ |
33
|
|
|
return ''; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
protected function getCacheKey(string $name): array |
37
|
|
|
{ |
38
|
|
|
return []; |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
protected function getCacheTag(): string |
42
|
|
|
{ |
43
|
|
|
return ''; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
protected function loadTableChecks(string $tableName): array |
47
|
|
|
{ |
48
|
|
|
return []; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
protected function loadTableDefaultValues(string $tableName): array |
52
|
|
|
{ |
53
|
|
|
return []; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
protected function loadTableForeignKeys(string $tableName): array |
57
|
|
|
{ |
58
|
|
|
return []; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
protected function loadTableIndexes(string $tableName): array |
62
|
|
|
{ |
63
|
|
|
return []; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
protected function loadTablePrimaryKey(string $tableName): Constraint|null |
67
|
|
|
{ |
68
|
|
|
return []; |
|
|
|
|
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
protected function loadTableUniques(string $tableName): array |
72
|
|
|
{ |
73
|
|
|
return []; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
protected function loadTableSchema(string $name): TableSchemaInterface|null |
77
|
|
|
{ |
78
|
|
|
return null; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
public function supportsSavepoint(): bool |
82
|
|
|
{ |
83
|
|
|
return false; |
84
|
|
|
} |
85
|
|
|
} |
86
|
|
|
|