Skip to main content

GF_Query_Call

The Gravity Forms Query Call class.

Source: includes/query/class-gf-query-call.php:6

Details

  • Kind: class
  • Namespace: (global)

Methods

MethodDescription
__construct()A function call.
sql()Generate the SQL.
CAST()A cast call.
RAND()A RAND call.
__get()Proxy read-only values.

Method Reference

__construct()

public function __construct( $function_name, $parameters=[] )

A function call.

Parameters

NameTypeDefaultDescription
$function_namestringThe function to call.
$parametersarray[]The function parameters. Default: []

Source: includes/query/class-gf-query-call.php:23

sql()

public function sql( $query )

Generate the SQL.

The default behavior is to just plop function_name( implode( ', ', $parameters ) ). For other cases, like CAST, check the derived classes.

Parameters

NameTypeDefaultDescription
$queryGF_QueryThe query.

Returns

  • string — The generated SQL.

Source: includes/query/class-gf-query-call.php:38

CAST()

public static function CAST( $column, $type )

A cast call.

Parameters

NameTypeDefaultDescription
$columnGF_Query_ColumnThe column to cast.
$typestringThe type to cast to.

Returns

Source: includes/query/class-gf-query-call.php:53

RAND()

public static function RAND()

A RAND call.

Returns

Source: includes/query/class-gf-query-call.php:66

__get()

public function __get( $key )

Proxy read-only values.

Parameters

NameTypeDefaultDescription
$key

Source: includes/query/class-gf-query-call.php:127