acs::db::nsdbi-postgresql method build_psql_body (protected)
<instance of acs::db::nsdbi-postgresql> build_psql_body tcl sql \ result_type
Defined in packages/acs-tcl/tcl/acs-db-12-procs.tcl
- Parameters:
- tcl (required)
- sql (required)
- result_type (required)
- Testcases:
- No testcase defined.
Source code: if {$result_type eq "record"} { return [string map [list @SQL@ $sql] [ns_trim -delimiter | { | return [::dbi_rows -result lists {*}[expr {$dbn ne "" ? [list -db $dbn] : ""}] { | select r.* from @SQL@ as r | }] }]] } else { return [ns_trim -delimiter | [string map [list @SQL@ $sql] { | set __result "" | ::dbi_0or1row -autonull {*}[expr {$dbn ne "" ? [list -db $dbn] : ""}] { | select @SQL@ as __result | } | return $__result }]] }XQL Not present: Generic, PostgreSQL, Oracle