ad_page_contract_filter_proc_object_id (public)
ad_page_contract_filter_proc_object_id name value_varname
Defined in packages/acs-tcl/tcl/tcl-documentation-procs.tcl
Checks whether the value is a valid object_id, i.e. in the range defined for the SQL datatype "integer", which is the same for Oracle and PostgreSQL. In case, object_types are altered in future versions of OpenACS to e.g. "longinteger", this function has to be adjusted as well. The function is essentially the same as ad_page_contract_filter "integer", but with the additional value range check.
- Parameters:
- name
value_varname
- Author:
- Gustaf Neumann
- Created:
- May 23, 2021
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_page_contract_filters
Source code: upvar $value_varname value if { [regexp {^(-)?(\d+)$} $value _ sign rest] } { set value $sign[util::trim_leading_zeros $rest] if {[string is integer -strict $value] && $value >= -2147483648 && $value <= 2147483647 } { return 1 } } ad_complain [_ acs-tcl.lt_name_is_not_an_oid] return 0XQL Not present: Generic, PostgreSQL, Oracle