db_exec_lob (private)

 db_exec_lob [ -ulevel ulevel ] type db statement_name pre_sql [ file ]

Defined in packages/acs-tcl/tcl/01-database-procs.tcl

A helper procedure to execute a SQL statement, potentially binding depending on the value of the $bind variable in the calling environment (if set).

Switches:
-ulevel (optional, defaults to "2")
Parameters:
type (required)
db (required)
statement_name (required)
pre_sql (required)
file (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 db_blob_get db_blob_get (public) db_exec_lob db_exec_lob db_blob_get->db_exec_lob db_blob_get_file db_blob_get_file (public) db_blob_get_file->db_exec_lob db_write_blob db_write_blob (public) db_write_blob->db_exec_lob db_driverkey db_driverkey (public) db_exec_lob->db_driverkey

Testcases:
No testcase defined.
Source code:
    set proc_name {db_exec_lob}
    set driverkey [db_driverkey -handle_p 1 $db]

    # Note: db_exec_lob is marked as private and in the entire
    # toolkit, is ONLY called from a few other procs defined in this
    # same file.  So we definitely could change it to take a -dbn
    # switch and remove the passed in db handle altogether, and call
    # 'db_driverkey -dbn' rather than 'db_driverkey -handle'.  But,
    # db_exec NEEDS 'db_driverkey -handle', so we might as well use it
    # here too.  --atp@piskorski.com, 2003/04/09 12:13 EDT

    # TODO: Using this as a wrapper for the separate _oracle and
    # _postgresql versions of this proc is ugly.  But also simplest
    # and safest at this point, as it let me change as little as
    # possible of those two relatively complex procs.
    # --atp@piskorski.com, 2003/04/09 11:55 EDT

    switch -- $driverkey {
        oracle {
            set which_proc {db_exec_lob_oracle}
        }
        postgresql {
            set which_proc {db_exec_lob_postgresql}
        }

        nsodbc -
        default {
            error "$proc_name is not supported for this database."
        }
    }

    ns_log Debug "$proc_name: $which_proc -ulevel [expr {$ulevel +1}] $type $db $statement_name $pre_sql $file"
    return [$which_proc -ulevel [expr {$ulevel +1}] $type $db $statement_name $pre_sql $file]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: