sql
Builds SQL using the received SqlBuilder block and returns a FetchSpec to obtain the execution results.
Note that the statement is not executed until one of the terminal operations on FetchSpec is invoked.
Return
a FetchSpec for retrieving the execution results
Parameters
an ID that uniquely identifies the query, used for purposes such as metrics
SqlBuilder block that constructs the SQL
Builds SQL using the received SqlBuilder block and returns a FetchSpec to obtain the execution results.
Note that the statement is not executed until one of the terminal operations on FetchSpec is invoked.
The sqlId is derived from the enclosing declaration of the call site at compile time by the compiler plugin and used when auto sqlId generation is enabled. "NONE" is used when auto sqlId generation is disabled, when the block is passed via a variable rather than written literally at the call site, or when the call site was not compiled with the compiler plugin.
Return
a FetchSpec for retrieving the execution results
Parameters
SqlBuilder block that constructs the SQL