List Info

Thread: name-based parameter binding




name-based parameter binding
user name
2006-05-10 02:38:15
I wrote 'name-based parameter binding' for DBI.
name-based placeholder is /\?(\w+)\?/

EXAMPLE:
  params = { :key1 => "foo", :key2 =>
"bar" }
  # ex1
  dbh.execute("SELECT * FROM table WHERE key1=?key1?
and key2=?key2?",params)
  # ex2 equivalent ex1
  dbh.execute("SELECT * FROM table WHERE key2=?key2?
and key1=?key1?",params)
_______________________________________________
Ruby-dbi-next mailing list
Ruby-dbi-nextrubyforge.org
h
ttp://rubyforge.org/mailman/listinfo/ruby-dbi-next
name-based parameter binding
user name
2006-05-10 02:56:09
Sorry, A correct patch is here.
_______________________________________________
Ruby-dbi-next mailing list
Ruby-dbi-nextrubyforge.org
h
ttp://rubyforge.org/mailman/listinfo/ruby-dbi-next
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )