@@ -965,14 +965,32 @@ function set_prefix(string $append = '')
965965
966966 /**
967967 * Does an `select into` statement by calling `select` method
968- * @param $newTable, - new database table to be created
969- * @param $fromColumns - the columns from old database table
970- * @param $oldTable - old database table
971- * @param $fromWhereConditions, - where clause `eq(x, y, _AND), another clause - same as array(x, =, y, and, extra) `
972- *
973- * @return mixed|object bool/result - false for error
968+ * @param string $newTable, - new database table to be created
969+ * @param mixed $fromColumns - the columns from old database table
970+ * @param string $oldTable - old database table
971+ * @param mixed $fromWhereConditions, - where clause `eq(x, y, _AND), another clause - same as array(x, =, y, and, extra)`
972+ * - In the following format:
973+ *```js
974+ * eq('key/Field/Column', $value, _AND), // combine next expression
975+ * neq('key/Field/Column', $value, _OR), // will combine next expression if
976+ * ne('key/Field/Column', $value), // the default is _AND so will combine next expression
977+ * lt('key/Field/Column', $value)
978+ * lte('key/Field/Column', $value)
979+ * gt('key/Field/Column', $value)
980+ * gte('key/Field/Column', $value)
981+ * isNull('key/Field/Column')
982+ * isNotNull('key/Field/Column')
983+ * like('key/Field/Column', '_%')
984+ * notLike('key/Field/Column', '_%')
985+ * in('key/Field/Column', $values)
986+ * notIn('key/Field/Column', $values)
987+ * between('key/Field/Column', $value, $value2)
988+ * notBetween('key/Field/Column', $value, $value2)
989+ *```
990+ * @return mixed bool/result - false for error
991+ * @codeCoverageIgnore
974992 */
975- function select_into ($ newTable , $ fromColumns = '* ' , $ oldTable = null , ...$ fromWhereConditions )
993+ function select_into (string $ newTable , $ fromColumns = '* ' , string $ oldTable = null , ...$ fromWhereConditions )
976994 {
977995 $ ezQuery = getInstance ();
978996 return ($ ezQuery instanceof DatabaseInterface)
@@ -1096,15 +1114,15 @@ function grouping(...$conditions)
10961114 * having( between( 'columns', values1, values2 ) ),
10971115 * orderBy( 'columns', 'desc' );
10981116 *</code>
1099- * @param mixed $groupBy The grouping expression.
1117+ * @param string|array $column The grouping expression.
11001118 *
11011119 * @return string - GROUP BY SQL statement, or false on error
11021120 */
1103- function groupBy ($ groupBy )
1121+ function groupBy ($ column )
11041122 {
11051123 $ ezQuery = getInstance ();
11061124 return ($ ezQuery instanceof DatabaseInterface)
1107- ? $ ezQuery ->groupBy ($ groupBy )
1125+ ? $ ezQuery ->groupBy ($ column )
11081126 : false ;
11091127 }
11101128
@@ -1364,16 +1382,16 @@ function unionAll($table = '', $columnFields = '*', ...$conditions)
13641382
13651383 /**
13661384 * Specifies an ordering for the query results.
1367- * @param string $orderBy - The column .
1385+ * @param string|array $column - Which columns to use for ordering .
13681386 * @param string $order - The ordering direction, either `ASC`|`DESC`.
13691387 *
13701388 * @return string - ORDER BY SQL statement, or false on error
13711389 */
1372- function orderBy ($ orderBy , $ order )
1390+ function orderBy ($ column , $ order )
13731391 {
13741392 $ ezQuery = getInstance ();
13751393 return ($ ezQuery instanceof DatabaseInterface)
1376- ? $ ezQuery ->orderBy ($ orderBy , $ order )
1394+ ? $ ezQuery ->orderBy ($ column , $ order )
13771395 : false ;
13781396 }
13791397
@@ -1394,6 +1412,9 @@ function limit($numberOf, $offset = null)
13941412 : false ;
13951413 }
13961414
1415+ /**
1416+ * @codeCoverageIgnore
1417+ */
13971418 function ezFunctions ()
13981419 {
13991420 return true ;
0 commit comments