File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333- Chg #343 : Remove ` yiisoft/json ` dependency (@Tigrov )
3434- Enh #345 : Refactor according changes in ` db ` package (@Tigrov )
3535- New #344 : Add ` caseSensitive ` option to like condition (@vjik )
36+ - Enh #347 : Remove ` getCacheKey() ` and ` getCacheTag() ` methods from ` Schema ` class (@Tigrov )
3637
3738## 1.2.0 March 21, 2024
3839
Original file line number Diff line number Diff line change 1010use Yiisoft \Db \Schema \Quoter ;
1111use Yiisoft \Db \Schema \QuoterInterface ;
1212use Yiisoft \Db \Schema \SchemaInterface ;
13-
1413use Yiisoft \Db \Sqlite \Column \ColumnFactory ;
1514
1615use function str_starts_with ;
Original file line number Diff line number Diff line change 2424use function array_column ;
2525use function array_map ;
2626use function count ;
27- use function md5 ;
28- use function serialize ;
2927use function strncasecmp ;
3028
3129/**
@@ -618,30 +616,6 @@ protected function findViewNames(string $schema = ''): array
618616 return $ views ;
619617 }
620618
621- /**
622- * Returns the cache key for the specified table name.
623- *
624- * @param string $name the table name.
625- *
626- * @return array The cache key.
627- */
628- protected function getCacheKey (string $ name ): array
629- {
630- return [self ::class, ...$ this ->generateCacheKey (), $ this ->db ->getQuoter ()->getRawTableName ($ name )];
631- }
632-
633- /**
634- * Returns the cache tag name.
635- *
636- * This allows {@see refresh()} to invalidate all cached table schemas.
637- *
638- * @return string The cache tag name.
639- */
640- protected function getCacheTag (): string
641- {
642- return md5 (serialize ([self ::class, ...$ this ->generateCacheKey ()]));
643- }
644-
645619 /**
646620 * @throws Throwable
647621 */
Original file line number Diff line number Diff line change @@ -281,10 +281,10 @@ public function testBuildWithQuery(): void
281281 $ db = $ this ->getConnection ();
282282
283283 $ qb = $ db ->getQueryBuilder ();
284- $ with1Query = (new query ($ db ))->select ('id ' )->from ('t1 ' )->where ('expr = 1 ' );
285- $ with2Query = (new query ($ db ))->select ('id ' )->from ('t2 ' )->innerJoin ('a1 ' , 't2.id = a1.id ' )->where ('expr = 2 ' );
286- $ with3Query = (new query ($ db ))->select ('id ' )->from ('t3 ' )->where ('expr = 3 ' );
287- $ query = (new query ($ db ))
284+ $ with1Query = (new Query ($ db ))->select ('id ' )->from ('t1 ' )->where ('expr = 1 ' );
285+ $ with2Query = (new Query ($ db ))->select ('id ' )->from ('t2 ' )->innerJoin ('a1 ' , 't2.id = a1.id ' )->where ('expr = 2 ' );
286+ $ with3Query = (new Query ($ db ))->select ('id ' )->from ('t3 ' )->where ('expr = 3 ' );
287+ $ query = (new Query ($ db ))
288288 ->withQuery ($ with1Query , 'a1 ' )
289289 ->withQuery ($ with2Query ->union ($ with3Query ), 'a2 ' )
290290 ->from ('a2 ' );
You can’t perform that action at this time.
0 commit comments