activerecord-fb-adapter 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ module ActiveRecord
54
54
  config = config.symbolize_keys.merge(:downcase_names => true)
55
55
  unless config.has_key?(:database)
56
56
  raise ArgumentError, "No database specified. Missing argument: database."
57
- end
57
+ end
58
58
  config[:database] = File.expand_path(config[:database]) if config[:host] =~ /localhost/i
59
59
  config[:database] = "#{config[:host]}/#{config[:port] || 3050}:#{config[:database]}" if config[:host]
60
60
  require 'fb'
@@ -75,7 +75,7 @@ module ActiveRecord
75
75
  def column_types
76
76
  {}
77
77
  end
78
-
78
+
79
79
  def columns
80
80
  self.any? ? self.first.keys : []
81
81
  end
@@ -513,7 +513,11 @@ module ActiveRecord
513
513
  end
514
514
 
515
515
  def quote_column_name(column_name) # :nodoc:
516
- %Q("#{ar_to_fb_case(column_name.to_s)}")
516
+ if @connection.dialect == 1
517
+ %Q(#{ar_to_fb_case(column_name.to_s)})
518
+ else
519
+ %Q("#{ar_to_fb_case(column_name.to_s)}")
520
+ end
517
521
  end
518
522
 
519
523
  def quote_table_name_for_assignment(table, attr)
@@ -602,7 +606,7 @@ module ActiveRecord
602
606
  log(expand(sql, args), name) do
603
607
  result, rows = @connection.execute(sql, *args) { |cursor| [cursor.fields, cursor.fetchall] }
604
608
  if result.respond_to?(:map)
605
- cols = result.map { |col| col.name }
609
+ cols = result.map { |col| col.name }
606
610
  ActiveRecord::Result.new(cols, rows)
607
611
  else
608
612
  result
@@ -683,7 +687,7 @@ module ActiveRecord
683
687
  end
684
688
  sql
685
689
  end
686
-
690
+
687
691
  def default_sequence_name(table_name, column = nil)
688
692
  "#{table_name.to_s[0, table_name_length - 4]}_seq"
689
693
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-fb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-07 00:00:00.000000000 Z
12
+ date: 2014-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fb