77use Yiisoft \Db \Driver \Pdo \AbstractPdoConnection ;
88use Yiisoft \Db \Driver \Pdo \PdoCommandInterface ;
99use Yiisoft \Db \Exception \InvalidArgumentException ;
10+ use Yiisoft \Db \Pgsql \Column \ColumnFactory ;
1011use Yiisoft \Db \QueryBuilder \QueryBuilderInterface ;
12+ use Yiisoft \Db \Schema \Column \ColumnFactoryInterface ;
1113use Yiisoft \Db \Schema \Quoter ;
1214use Yiisoft \Db \Schema \QuoterInterface ;
1315use Yiisoft \Db \Schema \SchemaInterface ;
@@ -44,6 +46,11 @@ public function createTransaction(): TransactionInterface
4446 return new Transaction ($ this );
4547 }
4648
49+ public function getColumnFactory (): ColumnFactoryInterface
50+ {
51+ return new ColumnFactory ();
52+ }
53+
4754 public function getLastInsertID (?string $ sequenceName = null ): string
4855 {
4956 if ($ sequenceName === null ) {
@@ -55,28 +62,16 @@ public function getLastInsertID(?string $sequenceName = null): string
5562
5663 public function getQueryBuilder (): QueryBuilderInterface
5764 {
58- return $ this ->queryBuilder ??= new QueryBuilder (
59- $ this ->getQuoter (),
60- $ this ->getSchema (),
61- $ this ->getServerInfo (),
62- );
65+ return $ this ->queryBuilder ??= new QueryBuilder ($ this );
6366 }
6467
6568 public function getQuoter (): QuoterInterface
6669 {
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 ());
7271 }
7372
7473 public function getSchema (): SchemaInterface
7574 {
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 );
8176 }
8277}
0 commit comments