template::query (public)
template::query statement_name result_name type sql [ args... ]
Defined in packages/acs-templating/tcl/query-procs.tcl
Public interface to template query api. This routine parses the arguments and dispatches to the query command specified by the type argument.
- Parameters:
- Options:
- statement_name (required)
- Standard db_api query name
- result_name (required)
- Tcl variable name when doing an uplevel to set the returned result
- type (required)
- The query type
- sql (required)
- The sql to be used for the query
- -maxrows
- Limits the query results of a multirow query to a fixed number of rows.
- -cache
- Cache the query results keyed on an identifier that is unique for both the query and the bind variables used in the query. The cached result reflects any initial specification of maxrows and startrows.
- -refresh
- Force a query to be performed even if it is cached, and refresh the cache.
Only applicable if the cache option is specified as well. Does not affect a previously specified timeout period.
- -timeout
- The maximum period of time for which the cached results are valid in seconds. Only applicable for persistently cached results.
- -persistent
- Cache the query results persistently, so that all subsequent requests use the results.
- Returns:
- 1 if query was a success, 0 if it failed
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.