@@ -292,13 +292,13 @@ public function settings()
292292 * @param string|null $useSessionId
293293 * @return $this
294294 */
295- public function useSession (string $ useSessionId = null )
295+ public function useSession (string $ useSessionId = '' )
296296 {
297297 if (!$ this ->settings ()->getSessionId ()) {
298298 if (!$ useSessionId ) {
299299 $ this ->settings ()->makeSessionId ();
300300 } else {
301- $ this ->settings ()->session_id ($ useSessionId );
301+ $ this ->settings ()->swhereInFileession_id ($ useSessionId );
302302 }
303303 }
304304 return $ this ;
@@ -383,14 +383,15 @@ public function enableExtremes(bool $flag = true)
383383 }
384384
385385 /**
386- * @param mixed[] $bindings
386+ * @param string $sql
387+ * @param array $bindings
387388 * @return Statement
388389 */
389390 public function select (
390391 string $ sql ,
391392 array $ bindings = [],
392- WhereInFile $ whereInFile = null ,
393- WriteToFile $ writeToFile = null
393+ ? WhereInFile $ whereInFile = null ,
394+ ? WriteToFile $ writeToFile = null
394395 )
395396 {
396397 return $ this ->transport ()->select ($ sql , $ bindings , $ whereInFile , $ writeToFile );
@@ -437,8 +438,8 @@ public function progressFunction(callable $callback)
437438 public function selectAsync (
438439 string $ sql ,
439440 array $ bindings = [],
440- WhereInFile $ whereInFile = null ,
441- WriteToFile $ writeToFile = null
441+ ? WhereInFile $ whereInFile = null ,
442+ ? WriteToFile $ writeToFile = null
442443 )
443444 {
444445 return $ this ->transport ()->selectAsync ($ sql , $ bindings , $ whereInFile , $ writeToFile );
@@ -805,14 +806,14 @@ public function isExists(string $database, string $table)
805806 /**
806807 * List of partitions
807808 *
808- * @return mixed[][]
809+ * @return array
809810 * @throws \Exception
810811 */
811- public function partitions (string $ table , int $ limit = null , bool $ active = null )
812+ public function partitions (string $ table , int $ limit = 0 , ? bool $ active = null )
812813 {
813814 $ database = $ this ->settings ()->getDatabase ();
814815 $ whereActiveClause = $ active === null ? '' : sprintf (' AND active = %s ' , (int )$ active );
815- $ limitClause = $ limit !== null ? ' LIMIT ' . $ limit : '' ;
816+ $ limitClause = $ limit > 0 ? ' LIMIT ' . $ limit : '' ;
816817
817818 return $ this ->select (<<<CLICKHOUSE
818819SELECT *
0 commit comments