db_blob_get_file (public)

 db_blob_get_file [ -dbn dbn ] statement_name sql [ args... ]

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

Switches:
-dbn (optional)
The database name to use. If empty_string, uses the default database.

TODO: This proc should probably be changed to take a final file argument, only, rather than the current args variable length argument list. Currently, it is called only 4 places in OpenACS, and each place args, if used at all, is always "-file $file". However, such a change might break custom code... I'm not sure. --atp@piskorski.com, 2003/04/09 11:39 EDT

Parameters:
statement_name (required)
sql (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_apm_tarballs apm_tarballs (test acs-tcl) db_blob_get_file db_blob_get_file test_apm_tarballs->db_blob_get_file ad_arg_parser ad_arg_parser (public) db_blob_get_file->ad_arg_parser db_driverkey db_driverkey (public) db_blob_get_file->db_driverkey db_exec_lob db_exec_lob (private) db_blob_get_file->db_exec_lob db_qd_get_fullname db_qd_get_fullname (public) db_blob_get_file->db_qd_get_fullname db_with_handle db_with_handle (public) db_blob_get_file->db_with_handle apm_extract_tarball apm_extract_tarball (public) apm_extract_tarball->db_blob_get_file content::revision::export_to_filesystem-lob content::revision::export_to_filesystem-lob (private) content::revision::export_to_filesystem-lob->db_blob_get_file packages/acs-subsite/www/shared/portrait-bits.tcl packages/acs-subsite/ www/shared/portrait-bits.tcl packages/acs-subsite/www/shared/portrait-bits.tcl->db_blob_get_file packages/photo-album/www/album-export.tcl packages/photo-album/ www/album-export.tcl packages/photo-album/www/album-export.tcl->db_blob_get_file publish::write_multiple_blobs publish::write_multiple_blobs (private) publish::write_multiple_blobs->db_blob_get_file

Testcases:
apm_tarballs
Source code:
    ad_arg_parser { bind file args } $args
    set proc_name {db_blob_get_file}
    set driverkey [db_driverkey $dbn]

    set full_statement_name [db_qd_get_fullname $statement_name]

    switch -- $driverkey {
        oracle {
            db_with_handle -dbn $dbn db {
                db_exec_lob blob_get_file $db $full_statement_name $sql $file
            }
        }

        postgresql {
            db_with_handle -dbn $dbn db {
                db_exec_lob blob_select_file $db $full_statement_name $sql $file
            }
        }

        nsodbc -
        default {
            error "$proc_name is not supported for this database."
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: