Nextcloud PHP API (stable19)

IFunctionBuilder

This class provides a builder for sql some functions

Tags
since
12.0.0

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

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
since
12.0.0
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
since
14.0.0
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
since
18.0.0
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
since
18.0.0
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
since
18.0.0
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
since
18.0.0
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
since
12.0.0
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
since
14.0.0
Return values
IQueryFunction

Search results