activerecord-fb-adapter 0.7.9 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- # Rails 3-specific database adapter for Firebird (http://firebirdsql.org)
1
+ # Rails 3 & 4 specific database adapter for Firebird (http://firebirdsql.org)
2
2
  # Author: Brent Rowland <rowland@rowlandresearch.com>
3
3
  # Based originally on FireRuby extension by Ken Kunz <kennethkunz@gmail.com>
4
4
 
@@ -11,8 +11,8 @@ module Arel
11
11
  class FB < Arel::Visitors::ToSql
12
12
  protected
13
13
 
14
- def visit_Arel_Nodes_SelectStatement(o)
15
- select_core = o.cores.map { |x| visit_Arel_Nodes_SelectCore(x) }.join
14
+ def visit_Arel_Nodes_SelectStatement o, *a
15
+ select_core = o.cores.map { |x| visit_Arel_Nodes_SelectCore(x, *a) }.join
16
16
  select_core.sub!(/^\s*SELECT/i, "SELECT #{visit(o.offset)}") if o.offset && !o.limit
17
17
  [
18
18
  select_core,
@@ -22,7 +22,7 @@ module Arel
22
22
  ].compact.join ' '
23
23
  end
24
24
 
25
- def visit_Arel_Nodes_UpdateStatement(o)
25
+ def visit_Arel_Nodes_UpdateStatement o, *a
26
26
  [
27
27
  "UPDATE #{visit o.relation}",
28
28
  ("SET #{o.values.map { |value| visit(value) }.join ', '}" unless o.values.empty?),
@@ -31,11 +31,11 @@ module Arel
31
31
  ].compact.join ' '
32
32
  end
33
33
 
34
- def visit_Arel_Nodes_Limit(o)
34
+ def visit_Arel_Nodes_Limit o, *a
35
35
  "ROWS #{visit(o.expr)}"
36
36
  end
37
37
 
38
- def visit_Arel_Nodes_Offset(o)
38
+ def visit_Arel_Nodes_Offset o, *a
39
39
  "SKIP #{visit(o.expr)}"
40
40
  end
41
41
 
@@ -550,7 +550,7 @@ module ActiveRecord
550
550
  # Returns an array of record hashes with the column names as keys and
551
551
  # column values as values.
552
552
  def select_all(arel, name = nil, binds = [])
553
- select(to_sql(arel, binds), name, binds)
553
+ add_column_types(select(to_sql(arel, binds), name, binds))
554
554
  end
555
555
 
556
556
  # Returns an array of arrays containing the field values.
@@ -694,6 +694,15 @@ module ActiveRecord
694
694
  # end
695
695
 
696
696
  protected
697
+ # add column_types method returns empty hash, requred for rails 4 compatibility
698
+ def add_column_types obj
699
+ class << obj
700
+ def column_types
701
+ {}
702
+ end
703
+ end
704
+ obj
705
+ end
697
706
  # Returns an array of record hashes with the column names as keys and
698
707
  # column values as values.
699
708
  def select(sql, name = nil, binds = [])
metadata CHANGED
@@ -1,82 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: activerecord-fb-adapter
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 7
9
- - 9
10
- version: 0.7.9
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Brent Rowland
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-11-09 00:00:00 -08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2013-11-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: fb
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- - 7
33
- - 0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
34
21
  version: 0.7.0
35
22
  type: :runtime
36
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.7.0
37
30
  description:
38
31
  email: rowland@rowlandresearch.com
39
32
  executables: []
40
-
41
33
  extensions: []
42
-
43
34
  extra_rdoc_files: []
44
-
45
- files:
35
+ files:
46
36
  - lib/active_record/connection_adapters/fb_adapter.rb
47
- has_rdoc: true
48
37
  homepage: http://github.com/rowland/activerecord-fb-adapter
49
- licenses: []
50
-
38
+ licenses:
39
+ - MIT
51
40
  post_install_message:
52
41
  rdoc_options: []
53
-
54
- require_paths:
42
+ require_paths:
55
43
  - lib
56
- required_ruby_version: !ruby/object:Gem::Requirement
44
+ required_ruby_version: !ruby/object:Gem::Requirement
57
45
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 0
64
- version: "0"
65
- required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
51
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
74
- requirements:
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements:
75
57
  - Firebird library fb
76
58
  rubyforge_project:
77
- rubygems_version: 1.4.2
59
+ rubygems_version: 1.8.23
78
60
  signing_key:
79
61
  specification_version: 3
80
- summary: ActiveRecord Firebird Adapter for Rails 3. Unlike fb_adapter for Rails 1.x and 2.x, this version attempts to support migrations.
62
+ summary: ActiveRecord Firebird Adapter for Rails 3. Unlike fb_adapter for Rails 1.x
63
+ and 2.x, this version attempts to support migrations.
81
64
  test_files: []
82
-