Module: Sequel::Plugins::PgRow::DatabaseMethods
- Defined in:
- lib/sequel/extensions/_model_pg_row.rb
Instance Method Summary collapse
- 
  
    
      #bound_variable_arg(arg, conn)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Handle Sequel::Model instances in bound variables. 
- 
  
    
      #row_type(db_type, v)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    If a Sequel::Model instance is given, return it as-is instead of attempting to convert it. 
Instance Method Details
#bound_variable_arg(arg, conn) ⇒ Object
Handle Sequel::Model instances in bound variables.
| 8 9 10 11 12 13 14 15 | # File 'lib/sequel/extensions/_model_pg_row.rb', line 8 def bound_variable_arg(arg, conn) case arg when Sequel::Model "(#{arg.values.values_at(*arg.columns).map{|v| bound_variable_array(v)}.join(',')})" else super end end |