Nextcloud PHP API (master)

IFunctionBuilder

This class provides a builder for sql some functions

Tags
since
12.0.0

Table of Contents

Methods

add()  : IQueryFunction
charLength()  : IQueryFunction
concat()  : IQueryFunction
Combines two input strings
count()  : IQueryFunction
greatest()  : IQueryFunction
Takes the maximum of multiple values
groupConcat()  : IQueryFunction
Returns a string which is the concatenation of all non-NULL values of X
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
octetLength()  : IQueryFunction
substring()  : IQueryFunction
Takes a substring from the input string
subtract()  : IQueryFunction
sum()  : IQueryFunction
Takes the sum of all rows in a column

Methods

groupConcat()

Returns a string which is the concatenation of all non-NULL values of X

public groupConcat(string|IQueryFunction $expr[, string|null $separator = ',' ]) : IQueryFunction

Usage examples:

groupConcat('column') -- with comma as separator (default separator)

groupConcat('column', ';') -- with different separator

Parameters
$expr : string|IQueryFunction

The expression to group

$separator : string|null = ','

The separator

Tags
since
24.0.0
Return values
IQueryFunction

substring()

Takes a substring from the input string

public substring(string|ILiteral|IParameter|IQueryFunction $input, string|ILiteral|IParameter|IQueryFunction $start[, null|ILiteral|IParameter|IQueryFunction $length = null ]) : IQueryFunction
Parameters
$input : string|ILiteral|IParameter|IQueryFunction

The input string

$start : string|ILiteral|IParameter|IQueryFunction

The start of the substring, note that counting starts at 1

$length : null|ILiteral|IParameter|IQueryFunction = null

The length of the substring

Tags
since
12.0.0
Return values
IQueryFunction

        
On this page

Search results