Permalink
Browse files

Merge commit 'wishdev/master'

  • Loading branch information...
2 parents e67af3b + 6fdcd9b commit f06142877bd7e86daaed6052c24ee9ba75dfcbd8 @jeremyevans committed Jan 25, 2009
Showing with 3 additions and 11 deletions.
  1. +1 −9 lib/sequel_core/adapters/firebird.rb
  2. +2 −2 spec/adapters/firebird_spec.rb
@@ -212,10 +212,6 @@ def transaction(server=nil)
def disconnect_connection(c)
c.close
end
-
- def quote_identifiers_default
- false
- end
end
# Dataset class for Firebird datasets
@@ -233,7 +229,7 @@ class Dataset < Sequel::Dataset
def fetch_rows(sql, &block)
execute(sql) do |s|
begin
- @columns = s.fields.map{|c| output_identifier(c)}
+ @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}
@@ -285,10 +281,6 @@ def literal(v)
end
end
- def quote_identifier(name)
- Fb::Global::reserved_keyword?(name) ? quoted_identifier(name.upcase) : super
- end
-
# The order of clauses in the SELECT SQL statement
def select_clause_order
SELECT_CLAUSE_ORDER
@@ -205,9 +205,9 @@ def FIREBIRD_DB.ret_commit
specify "should quote and upcase reserved keywords" do
@d = FIREBIRD_DB[:testing]
- @d.upcase_identifiers= false
+ @d.quote_identifiers = true
@d.select(:select).sql.should == \
- 'SELECT "SELECT" FROM testing'
+ 'SELECT "SELECT" FROM "TESTING"'
end
end

0 comments on commit f061428

Please sign in to comment.