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:
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
Options:
-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):
%3 packages/bookmarks/www/bookmark-edit.tcl packages/bookmarks/ www/bookmark-edit.tcl template::query template::query packages/bookmarks/www/bookmark-edit.tcl->template::query packages/bookmarks/www/bookmark-view.tcl packages/bookmarks/ www/bookmark-view.tcl packages/bookmarks/www/bookmark-view.tcl->template::query db_qd_get_fullname db_qd_get_fullname (public) template::query->db_qd_get_fullname db_with_handle db_with_handle (public) template::query->db_with_handle template::get_cached_result template::get_cached_result (private) template::query->template::get_cached_result template::set_cached_result template::set_cached_result (private) template::query->template::set_cached_result template::util::get_opts template::util::get_opts (public) template::query->template::util::get_opts

Testcases:
No testcase defined.
[ show source ]
Show another procedure: