@@ -148,7 +148,6 @@ private function compile(Builder $builder)
148
148
}
149
149
150
150
$ cache = $ builder ->connection ->config ['cache_tables ' ];
151
-
152
151
$ types = [];
153
152
154
153
foreach ($ arrTables as $ tables ) {
@@ -165,10 +164,10 @@ private function compile(Builder $builder)
165
164
}
166
165
167
166
if ($ cache ) {
168
- $ aux = Cache::remember ('sybase_columns/ ' .$ tables .'.columns_info ' , env ('SYBASE_CACHE_TABLES_TIME ' ) ?? 3600 , function () use ($ tables ) {
167
+ $ cacheTime = key_exists ('cache_time ' ,$ builder ->connection ->config ) ? $ builder ->connection ->config ['cache_time ' ] : 3600 ;
168
+ $ aux = cache ()->remember ("sybase_columns. $ tables.columns_info " , $ cacheTime , function () use ($ tables ) {
169
169
$ queryString = $ this ->queryString ($ tables );
170
170
$ queryRes = $ this ->getPdo ()->query ($ queryString );
171
-
172
171
return $ queryRes ->fetchAll (PDO ::FETCH_NAMED );
173
172
});
174
173
} else {
@@ -342,7 +341,7 @@ private function compileNewQuery($query, $bindings)
342
341
$ newQuery = join (array_map (fn ($ k1 , $ k2 ) => $ k1 .$ k2 , $ partQuery , $ bindings ));
343
342
$ newQuery = str_replace ('[] ' , '' , $ newQuery );
344
343
$ app_encoding = config ('database.sybase.app_encoding ' );
345
- if (! $ app_encoding ) {
344
+ if (is_null ( $ app_encoding) ) {
346
345
return $ newQuery ;
347
346
}
348
347
$ db_charset = config ('database.sybase.db_charset ' );
@@ -392,7 +391,7 @@ public function select($query, $bindings = [], $useReadPdo = true)
392
391
$ result = [...$ result ];
393
392
394
393
$ app_encoding = config ('database.sybase.app_encoding ' );
395
- if (! $ app_encoding ) {
394
+ if (is_null ( $ app_encoding) ) {
396
395
return $ result ;
397
396
}
398
397
$ db_charset = config ('database.sybase.db_charset ' );
0 commit comments