7
7
use Yiisoft \Db \Driver \Pdo \AbstractPdoConnection ;
8
8
use Yiisoft \Db \Driver \Pdo \PdoCommandInterface ;
9
9
use Yiisoft \Db \Exception \InvalidArgumentException ;
10
+ use Yiisoft \Db \Pgsql \Column \ColumnFactory ;
10
11
use Yiisoft \Db \QueryBuilder \QueryBuilderInterface ;
12
+ use Yiisoft \Db \Schema \Column \ColumnFactoryInterface ;
11
13
use Yiisoft \Db \Schema \Quoter ;
12
14
use Yiisoft \Db \Schema \QuoterInterface ;
13
15
use Yiisoft \Db \Schema \SchemaInterface ;
@@ -44,6 +46,11 @@ public function createTransaction(): TransactionInterface
44
46
return new Transaction ($ this );
45
47
}
46
48
49
+ public function getColumnFactory (): ColumnFactoryInterface
50
+ {
51
+ return new ColumnFactory ();
52
+ }
53
+
47
54
public function getLastInsertID (?string $ sequenceName = null ): string
48
55
{
49
56
if ($ sequenceName === null ) {
@@ -55,28 +62,16 @@ public function getLastInsertID(?string $sequenceName = null): string
55
62
56
63
public function getQueryBuilder (): QueryBuilderInterface
57
64
{
58
- return $ this ->queryBuilder ??= new QueryBuilder (
59
- $ this ->getQuoter (),
60
- $ this ->getSchema (),
61
- $ this ->getServerInfo (),
62
- );
65
+ return $ this ->queryBuilder ??= new QueryBuilder ($ this );
63
66
}
64
67
65
68
public function getQuoter (): QuoterInterface
66
69
{
67
- if ($ this ->quoter === null ) {
68
- $ this ->quoter = new Quoter ('" ' , '" ' , $ this ->getTablePrefix ());
69
- }
70
-
71
- return $ this ->quoter ;
70
+ return $ this ->quoter ??= new Quoter ('" ' , '" ' , $ this ->getTablePrefix ());
72
71
}
73
72
74
73
public function getSchema (): SchemaInterface
75
74
{
76
- if ($ this ->schema === null ) {
77
- $ this ->schema = new Schema ($ this , $ this ->schemaCache );
78
- }
79
-
80
- return $ this ->schema ;
75
+ return $ this ->schema ??= new Schema ($ this , $ this ->schemaCache );
81
76
}
82
77
}
0 commit comments