plsql_utility::generate_attribute_dml (public)
plsql_utility::generate_attribute_dml \ [ -start_with_comma start_with_comma ] [ -prepend prepend ] \ [ -ignore ignore ] table_name attr_list
Defined in packages/acs-subsite/tcl/plsql-utility-procs.tcl
Generates the string for a sql insert... e.g. ",col1, col2"
- Switches:
- -start_with_comma (optional, defaults to
"t"
)- -prepend (optional)
- -ignore (optional)
- Parameters:
- table_name (required)
- attr_list (required)
- Author:
- Michael Bryzek <mbryzek@arsdigita.com>
- Created:
- 11/2000
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set ignore [string toupper $ignore] set this_columns [list] set table_name [string toupper [string trim $table_name]] foreach triple $attr_list { set table [string toupper [string trim [lindex $triple 0]]] set column [string toupper [string trim [lindex $triple 1]]] if {[string toupper $column] in $ignore} { # Ignore this column continue } if {$table eq $table_name} { lappend this_columns "$prepend$column" } } if { [llength $this_columns] == 0 } { return "" } set return_value [join $this_columns ", "] if { $start_with_comma == "t" } { return ", $return_value" } return $return_valueXQL Not present: Generic, PostgreSQL, Oracle