activerecord-nuodb-adapter 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CONTRIBUTION.rdoc
CHANGED
@@ -12,7 +12,7 @@ To compile and test run this command:
|
|
12
12
|
|
13
13
|
Or from the source tree:
|
14
14
|
|
15
|
-
gem install pkg/activerecord-nuodb-adapter-1.0.
|
15
|
+
gem install pkg/activerecord-nuodb-adapter-1.0.1.gem
|
16
16
|
|
17
17
|
Or you can do this using Rake:
|
18
18
|
|
@@ -41,26 +41,26 @@ Run the tests:
|
|
41
41
|
|
42
42
|
Tag the product using tags per the SemVer specification; our tags have a v-prefix:
|
43
43
|
|
44
|
-
git tag -a v1.0.
|
44
|
+
git tag -a v1.0.1 -m "SemVer Version: v1.0.1"
|
45
45
|
git push --tags
|
46
46
|
|
47
47
|
If you make a mistake, take it back quickly:
|
48
48
|
|
49
|
-
git tag -d v1.0.
|
50
|
-
git push origin :refs/tags/v1.0.
|
49
|
+
git tag -d v1.0.1
|
50
|
+
git push origin :refs/tags/v1.0.1
|
51
51
|
|
52
52
|
===PUBLISHING
|
53
53
|
|
54
54
|
Here are the commands used to publish:
|
55
55
|
|
56
|
-
gem push pkg/activerecord-nuodb-adapter-1.0.
|
56
|
+
gem push pkg/activerecord-nuodb-adapter-1.0.1.gem
|
57
57
|
|
58
58
|
== INSPECTING THE GEM
|
59
59
|
|
60
60
|
It is often useful to inspect the contents of a Gem before distribution.
|
61
61
|
To do this you dump the contents of a gem thus:
|
62
62
|
|
63
|
-
gem unpack pkg/activerecord-nuodb-adapter-1.0.
|
63
|
+
gem unpack pkg/activerecord-nuodb-adapter-1.0.1.gem
|
64
64
|
|
65
65
|
== RUNNING ACTIVE RECORD COMPLIANCE TEST SUITES
|
66
66
|
|
@@ -62,10 +62,37 @@ module ActiveRecord
|
|
62
62
|
|
63
63
|
class NuoDBColumn < Column
|
64
64
|
|
65
|
-
def initialize(name, default, sql_type = nil, null = true, options = {})
|
65
|
+
def initialize(name, default, sql_type = nil, null = true, length = nil, precision = nil, scale = nil, options = {})
|
66
66
|
@options = options.symbolize_keys
|
67
|
-
|
68
|
-
@
|
67
|
+
|
68
|
+
@name = name
|
69
|
+
@null = null
|
70
|
+
|
71
|
+
# NuoDB stores fixed point decimal values as 'bigint'
|
72
|
+
# Examine the scale to determine the type
|
73
|
+
if precision > 0 && sql_type == 'bigint'
|
74
|
+
@sql_type = 'decimal'
|
75
|
+
@type = :decimal
|
76
|
+
@precision = precision
|
77
|
+
@scale = scale
|
78
|
+
else
|
79
|
+
@sql_type = sql_type
|
80
|
+
@type = simplified_type(sql_type)
|
81
|
+
@precision = nil
|
82
|
+
@scale = nil
|
83
|
+
end
|
84
|
+
|
85
|
+
# Limit only applies to :string, :text, :binary, and :integer
|
86
|
+
# See http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html
|
87
|
+
if @type =~ /^(string|text|binary|integer)$/ && @sql_type != 'string'
|
88
|
+
@limit = length
|
89
|
+
else
|
90
|
+
@limit = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
@default = extract_default(default)
|
94
|
+
@primary = @options[:is_identity] || @options[:is_primary]
|
95
|
+
@coder = nil
|
69
96
|
end
|
70
97
|
|
71
98
|
class << self
|
@@ -150,6 +177,8 @@ module ActiveRecord
|
|
150
177
|
:time
|
151
178
|
when /date/i then
|
152
179
|
:date
|
180
|
+
when /string/i then
|
181
|
+
:text
|
153
182
|
else
|
154
183
|
super
|
155
184
|
end
|
@@ -580,6 +609,9 @@ module ActiveRecord
|
|
580
609
|
fields.field as name,
|
581
610
|
fields.defaultvalue as default_value,
|
582
611
|
datatypes.name as data_type,
|
612
|
+
fields.length as length,
|
613
|
+
fields.scale as scale,
|
614
|
+
fields.precision as precision,
|
583
615
|
fields.flags as flags
|
584
616
|
FROM
|
585
617
|
system.fields AS fields, system.datatypes AS datatypes
|
@@ -592,7 +624,7 @@ module ActiveRecord
|
|
592
624
|
columns = []
|
593
625
|
result.map do |row|
|
594
626
|
row.symbolize_keys!
|
595
|
-
columns << NuoDBColumn.new(row[:name].downcase, row[:default_value], row[:data_type], row[:flags].to_i & 1 == 0)
|
627
|
+
columns << NuoDBColumn.new(row[:name].downcase, row[:default_value], row[:data_type], row[:flags].to_i & 1 == 0, row[:length], row[:scale], row[:precision])
|
596
628
|
end
|
597
629
|
columns
|
598
630
|
end
|
@@ -608,10 +640,10 @@ module ActiveRecord
|
|
608
640
|
:datetime => {:name => 'timestamp'},
|
609
641
|
:decimal => {:name => 'decimal'},
|
610
642
|
:float => {:name => 'float', :limit => 8},
|
611
|
-
:integer => {:name => 'integer'},
|
643
|
+
:integer => {:name => 'integer', :limit => 4},
|
612
644
|
:primary_key => 'int not null generated by default as identity primary key',
|
613
645
|
:string => {:name => 'varchar', :limit => 255},
|
614
|
-
:text => {:name => '
|
646
|
+
:text => {:name => 'string'},
|
615
647
|
:time => {:name => 'time'},
|
616
648
|
:timestamp => {:name => 'timestamp'},
|
617
649
|
# nuodb specific types...
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-nuodb-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Robert Buck
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-31 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: activerecord
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rdoc
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: nuodb
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -96,27 +105,28 @@ files:
|
|
96
105
|
homepage: http://nuodb.github.com/ruby-activerecord-nuodb-adapter/
|
97
106
|
licenses:
|
98
107
|
- BSD
|
99
|
-
metadata: {}
|
100
108
|
post_install_message:
|
101
109
|
rdoc_options:
|
102
110
|
- --charset=UTF-8
|
103
111
|
require_paths:
|
104
112
|
- lib
|
105
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
106
115
|
requirements:
|
107
|
-
- - '>='
|
116
|
+
- - ! '>='
|
108
117
|
- !ruby/object:Gem::Version
|
109
118
|
version: '0'
|
110
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
111
121
|
requirements:
|
112
|
-
- - '>='
|
122
|
+
- - ! '>='
|
113
123
|
- !ruby/object:Gem::Version
|
114
124
|
version: '0'
|
115
125
|
requirements: []
|
116
126
|
rubyforge_project:
|
117
|
-
rubygems_version:
|
127
|
+
rubygems_version: 1.8.24
|
118
128
|
signing_key:
|
119
|
-
specification_version:
|
129
|
+
specification_version: 3
|
120
130
|
summary: ActiveRecord adapter with AREL support for NuoDB.
|
121
131
|
test_files:
|
122
132
|
- test/test_simple.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: dceb4c4edff859d8247cce658377dfcf6b0827a0
|
4
|
-
data.tar.gz: f87ceee850943be68e849ab746f67622cde524db
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: c26ebe7068c17f61ae3340b286816e242360e4e90a756ebf7e44b73256099c5a55892bdfe6da5dd7070f5672651209f042b2ce62faa858e32bed65137f0d5f95
|
7
|
-
data.tar.gz: e80c91cd528092e7ca348edbf006d8c330ac3ea493180ff4ab171aec96b45fe4795669a214f4e78fcb95c6258c9a5b790e1be4af683e66f79931058f28aa1942
|