File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -254,22 +254,25 @@ function () use ($driver): array {
254254
255255 public function retrieveFirstSeqIndexedColumns (): array
256256 {
257- try {
258- static $ indexes ;
257+ static $ indexes ;
259258
260- $ result = $ indexes [$ this ->getConnectionName () . $ this ->getTable ()] ??=
261- $ this ->retrieveIndexesFromTable ()->where ('Seq_in_index ' , 1 )->pluck ('Column_name ' )->all ();
259+ try {
260+ $ result = $ indexes [$ this ->getConnectionName () . $ this ->getTable ()] ??= \array_values (\array_unique (
261+ $ this ->retrieveIndexesFromTable ()->where ('Seq_in_index ' , 1 )->pluck ('Column_name ' )->all ()
262+ ));
262263 } catch (\Throwable $ e ) {
263264 if (GeneralHelper::isDebug ()) {
264265 Log::error ($ this ::class . ' error getting indexes: ' . $ e ->getMessage ());
265266 }
266267 }
267268
268- if (\count ($ result ?? []) === 0 ) {
269+ if (($ result ??= []) === [] && $ this -> indexRequiredOnFiltering ) {
269270 $ this ->indexRequiredOnFiltering = false ;
271+
272+ return [];
270273 }
271274
272- return \array_values ( \array_unique ( $ result ?? [])) ;
275+ return $ result ;
273276 }
274277
275278 /**
You can’t perform that action at this time.
0 commit comments