IFunctionBuilder
This class provides a builder for sql some functions
Tags
Table of Contents
- add() : IQueryFunction
- concat() : IQueryFunction
- Combines two input strings
- count() : IQueryFunction
- greatest() : IQueryFunction
- Takes the maximum of multiple values
- least() : IQueryFunction
- Takes the minimum of multiple values
- lower() : IQueryFunction
- Transforms a string field or value to lower case
- max() : IQueryFunction
- Takes the maximum of all rows in a column
- md5() : IQueryFunction
- Calculates the MD5 hash of a given input
- min() : IQueryFunction
- Takes the minimum of all rows in a column
- substring() : IQueryFunction
- Takes a substring from the input string
- subtract() : IQueryFunction
- sum() : IQueryFunction
- Takes the sum of all rows in a column
Methods
add()
public
add(mixed $x, mixed $y) : IQueryFunction
Parameters
- $x : mixed
-
The first input field or number
- $y : mixed
-
The second input field or number
Tags
Return values
IQueryFunction —concat()
Combines two input strings
public
concat(mixed $x, mixed $y) : IQueryFunction
Parameters
- $x : mixed
-
The first input string
- $y : mixed
-
The seccond input string
Tags
Return values
IQueryFunction —count()
public
count([mixed $count = '' ][, string $alias = '' ]) : IQueryFunction
Parameters
- $count : mixed = ''
-
The input to be counted
- $alias : string = ''
-
Alias for the counter
Tags
Return values
IQueryFunction —greatest()
Takes the maximum of multiple values
public
greatest(mixed $x, mixed $y) : IQueryFunction
If you want to get the maximum value of all rows in a column, use max
instead
Parameters
- $x : mixed
-
the first input field or number
- $y : mixed
-
the first input field or number
Tags
Return values
IQueryFunction —least()
Takes the minimum of multiple values
public
least(mixed $x, mixed $y) : IQueryFunction
If you want to get the minimum value of all rows in a column, use min
instead
Parameters
- $x : mixed
-
the first input field or number
- $y : mixed
-
the first input field or number
Tags
Return values
IQueryFunction —lower()
Transforms a string field or value to lower case
public
lower(mixed $field) : IQueryFunction
Parameters
- $field : mixed
Tags
Return values
IQueryFunction —max()
Takes the maximum of all rows in a column
public
max(mixed $field) : IQueryFunction
If you want to get the maximum value of multiple columns in the same row, use greatest
instead
Parameters
- $field : mixed
-
the column to maximum
Tags
Return values
IQueryFunction —md5()
Calculates the MD5 hash of a given input
public
md5(mixed $input) : IQueryFunction
Parameters
- $input : mixed
-
The input to be hashed
Tags
Return values
IQueryFunction —min()
Takes the minimum of all rows in a column
public
min(mixed $field) : IQueryFunction
If you want to get the minimum value of multiple columns in the same row, use least
instead
Parameters
- $field : mixed
-
the column to minimum
Tags
Return values
IQueryFunction —substring()
Takes a substring from the input string
public
substring(mixed $input, mixed $start[, mixed $length = null ]) : IQueryFunction
Parameters
- $input : mixed
-
The input string
- $start : mixed
-
The start of the substring, note that counting starts at 1
- $length : mixed = null
-
The length of the substring
Tags
Return values
IQueryFunction —subtract()
public
subtract(mixed $x, mixed $y) : IQueryFunction
Parameters
- $x : mixed
-
The first input field or number
- $y : mixed
-
The second input field or number
Tags
Return values
IQueryFunction —sum()
Takes the sum of all rows in a column
public
sum(mixed $field) : IQueryFunction
Parameters
- $field : mixed
-
the column to sum