lib/sequel/adapters/cockroachdb.rb
# SQL for doing fast table insert from stdin.
SQL for doing fast table insert from stdin.
SQL for doing fast table insert from stdin .
def copy_into_sql(table, opts)
        sql = String.new
        sql << "COPY #{literal(table)}"
        if cols = opts[:columns]
          sql << literal(Array(cols))
        end
        sql << " FROM STDIN"
        if opts[:options] || opts[:format]
          sql << " #{opts[:format]}" if opts[:format]
          sql << "#{', ' if opts[:format]}#{opts[:options]}" if opts[:options]
        end
        sql
      end
def copy_into_sql ( table , opts ) sql = String . new sql << "COPY #{literal(table)}" if cols = opts [ :columns ] sql << literal ( Array ( cols ) ) end sql << " FROM STDIN" if opts [ :options ] || opts [ :format ] sql << " #{opts[:format]}" if opts [ :format ] sql << "#{', ' if opts[:format]}#{opts[:options]}" if opts [ :options ] end sql end
SQL for doing fast table insert from stdin.
SQL for doing fast table insert from stdin .
table
<not_specific>
opts
<not_specific>