Default implementation of the argument mapper to allow native database support for bind variables and prepared statements (as opposed to the emulated ones used by default).
Set the bind arguments based on the hash and call super.
# File lib/sequel/dataset/prepared_statements.rb, line 25 def call(bind_vars={}, &block) ds = bind(bind_vars) ds.prepared_sql ds.bind_arguments = ds.map_to_prepared_args(ds.opts[:bind_vars]) ds.run(&block) end
Override the given *_sql method based on the type, and cache the result of the sql.
# File lib/sequel/dataset/prepared_statements.rb, line 34 def prepared_sql return @prepared_sql if @prepared_sql @prepared_args ||= [] @prepared_sql = super meta_def("#{sql_query_type}_sql"){|*args| prepared_sql} @prepared_sql end
Generated with the Darkfish Rdoc Generator 2.