Package dev.frostlake.functions.table
Class ToQuery
java.lang.Object
dev.frostlake.functions.TableFunction
dev.frostlake.functions.table.ToQuery
TO_QUERY table function — compiles a SQL text into a query and returns its result set:
SELECT * FROM TABLE(TO_QUERY('SELECT ...')). Optional named arguments are bound into
:name placeholders inside the text (TO_QUERY('... WHERE c = :v', v => 5));
an unsupplied placeholder binds as NULL.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecute the table function with positional arguments.The query text's parameter is named SQL, not INPUT —TO_QUERY(SQL => '…')runs andTO_QUERY(INPUT => '…')is refused for naming a parameter that does not exist.voidvalidateArgs(Map<String, Object> namedArgs) Validate the arguments passed to the functionMethods inherited from class dev.frostlake.functions.TableFunction
getName
-
Constructor Details
-
ToQuery
-
-
Method Details
-
execute
The query text's parameter is named SQL, not INPUT —TO_QUERY(SQL => '…')runs andTO_QUERY(INPUT => '…')is refused for naming a parameter that does not exist. Every OTHER named argument is a bind for a:nameplaceholder inside the text.- Specified by:
executein classTableFunction
-
execute
Description copied from class:TableFunctionExecute the table function with positional arguments. Override this in user-defined table functions.- Overrides:
executein classTableFunction
-
validateArgs
Description copied from class:TableFunctionValidate the arguments passed to the function- Specified by:
validateArgsin classTableFunction
-