Yield all rows returned by executing the given SQL and converting the types.
# File lib/sequel/adapters/firebird.rb, line 204 def fetch_rows(sql, &block) execute(sql) do |s| begin @columns = s.fields.map{|c| output_identifier(c.name)} s.fetchall(:symbols_hash).each do |r| h = {} r.each{|k,v| h[output_identifier(k)] = v} yield h end ensure s.close end end self end
Insert given values into the database.
# File lib/sequel/adapters/firebird.rb, line 221 def insert(*values) if !@opts[:sql] clone(default_server_opts(:sql=>insert_returning_pk_sql(*values))).single_value else execute_insert(insert_sql(*values), :table=>opts[:from].first, :values=>values.size == 1 ? values.first : values) end end
Use the RETURNING clause to return the primary key of the inserted record, if it exists
# File lib/sequel/adapters/firebird.rb, line 231 def insert_returning_pk_sql(*values) pk = db.primary_key(opts[:from].first) insert_returning_sql(pk ? Sequel::SQL::Identifier.new(pk) : NULL, *values) end
Use the RETURNING clause to return the columns listed in returning.
# File lib/sequel/adapters/firebird.rb, line 237 def insert_returning_sql(returning, *values) "#{insert_sql(*values)} RETURNING #{column_list(Array(returning))}" end
Insert a record returning the record inserted
# File lib/sequel/adapters/firebird.rb, line 242 def insert_select(*values) naked.clone(default_server_opts(:sql=>insert_returning_sql(nil, *values))).single_record end
# File lib/sequel/adapters/firebird.rb, line 246 def requires_sql_standard_datetimes? true end
The order of clauses in the SELECT SQL statement
# File lib/sequel/adapters/firebird.rb, line 251 def select_clause_methods SELECT_CLAUSE_METHODS end
# File lib/sequel/adapters/firebird.rb, line 255 def select_limit_sql(sql) sql << " FIRST #{@opts[:limit]}" if @opts[:limit] sql << " SKIP #{@opts[:offset]}" if @opts[:offset] end
Firebird does not support INTERSECT or EXCEPT
# File lib/sequel/adapters/firebird.rb, line 261 def supports_intersect_except? false end
Generated with the Darkfish Rdoc Generator 2.