@@ -447,7 +447,7 @@ public function alias(string $tableChain, string $alias): static
447447 */
448448 public function aggregation (string $ function , ?string $ groupFunction = null ): mixed
449449 {
450- $ selection = $ this ->createSelectionInstance ( );
450+ $ selection = $ this ->explorer -> table ( $ this -> name );
451451 $ selection ->getSqlBuilder ()->importConditions ($ this ->getSqlBuilder ());
452452 if ($ groupFunction && $ selection ->getSqlBuilder ()->importGroupConditions ($ this ->getSqlBuilder ())) {
453453 $ selection ->select ("$ function AS aggregate " );
@@ -536,7 +536,7 @@ protected function execute(): void
536536 $ this ->rows = [];
537537 $ usedPrimary = true ;
538538 while ($ row = @$ result ->fetchAssoc ()) { // @ may contain duplicate columns
539- $ row = $ this ->createRow ( $ row );
539+ $ row = $ this ->explorer -> createActiveRow ( $ this , $ row );
540540 $ usedPrimary = $ usedPrimary && ($ primary = $ row ->getSignature (throw: false )) !== '' ;
541541 $ this ->rows [$ usedPrimary ? $ primary : $ key ++] = $ row ;
542542 }
@@ -551,24 +551,11 @@ protected function execute(): void
551551 }
552552
553553
554- /** @deprecated */
555- protected function createRow (array $ row ): ActiveRow
556- {
557- return $ this ->explorer ->createActiveRow ($ row , $ this );
558- }
559-
560-
561554 /** @deprecated */
562555 public function createSelectionInstance (?string $ table = null ): self
563556 {
564- return $ this ->explorer ->table ($ table ?: $ this ->name );
565- }
566-
567-
568- /** @deprecated */
569- protected function createGroupedSelectionInstance (string $ table , string $ column ): GroupedSelection
570- {
571- return $ this ->explorer ->createGroupedSelection ($ this , $ table , $ column );
557+ // DELETE
558+ return $ this ->explorer ->table ($ table ?? $ this ->name );
572559 }
573560
574561
@@ -830,7 +817,7 @@ public function insert(iterable $data): ActiveRow|array|int|bool
830817 return $ return ->getRowCount ();
831818 }
832819
833- $ row = $ this ->createSelectionInstance ( )
820+ $ row = $ this ->explorer -> table ( $ this -> name )
834821 ->select ('* ' )
835822 ->wherePrimary ($ primaryKey )
836823 ->fetch ();
@@ -918,7 +905,7 @@ public function getReferencedTable(ActiveRow $row, ?string $table, ?string $colu
918905 }
919906
920907 if ($ cacheKeys ) {
921- $ selection = $ this ->createSelectionInstance ($ table );
908+ $ selection = $ this ->explorer -> table ($ table );
922909 $ selection ->where ($ selection ->getPrimary (), array_keys ($ cacheKeys ));
923910 } else {
924911 $ selection = [];
@@ -951,7 +938,7 @@ public function getReferencingTable(
951938
952939 $ prototype = &$ this ->refCache ['referencingPrototype ' ][$ this ->getSpecificCacheKey ()]["$ table. $ column " ];
953940 if (!$ prototype ) {
954- $ prototype = $ this ->createGroupedSelectionInstance ($ table , $ column );
941+ $ prototype = $ this ->explorer -> createGroupedSelectionInstance ($ this , $ table , $ column );
955942 $ prototype ->where ("$ table. $ column " , array_keys ((array ) $ this ->rows ));
956943 $ prototype ->getSpecificCacheKey ();
957944 }
0 commit comments