activerecord-rdb-adapter 0.7.4 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/extconf.rb +93 -0
  3. data/fb.c +3081 -0
  4. data/fb_extensions.rb +21 -0
  5. metadata +7 -16
data/fb_extensions.rb ADDED
@@ -0,0 +1,21 @@
1
+ module Fb
2
+ class Connection
3
+ def execute_script(sql)
4
+ stmts = []
5
+ delim = ';'
6
+ while sql =~ /\S/
7
+ stmt, sql = sql.split(delim, 2)
8
+ if stmt =~ /^\s*set\s+term\s+(\S+)/i
9
+ delim = $1
10
+ elsif stmt =~ /\S/
11
+ stmts << stmt
12
+ end
13
+ end
14
+ self.transaction do
15
+ stmts.each do |stmt|
16
+ self.execute(stmt)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-rdb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Lobanov (RedSoft)
@@ -10,20 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: fb
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.9'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rails
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -41,10 +27,14 @@ dependencies:
41
27
  description: ActiveRecord RedDatabase 3+ and Firebird 3+ Adapter for Rails 5+
42
28
  email: andrey.lobanov@red-soft.ru
43
29
  executables: []
44
- extensions: []
30
+ extensions:
31
+ - extconf.rb
45
32
  extra_rdoc_files: []
46
33
  files:
47
34
  - README.md
35
+ - extconf.rb
36
+ - fb.c
37
+ - fb_extensions.rb
48
38
  - lib/active_record/connection_adapters/rdb/database_limits.rb
49
39
  - lib/active_record/connection_adapters/rdb/database_statements.rb
50
40
  - lib/active_record/connection_adapters/rdb/quoting.rb
@@ -65,6 +55,7 @@ metadata: {}
65
55
  post_install_message:
66
56
  rdoc_options: []
67
57
  require_paths:
58
+ - "."
68
59
  - lib
69
60
  required_ruby_version: !ruby/object:Gem::Requirement
70
61
  requirements: