vertica 0.9.0.beta3 → 0.9.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ class BackendMessageTest < Test::Unit::TestCase
23
23
 
24
24
  def test_ready_for_query_message
25
25
  msg = Vertica::Messages::ReadyForQuery.new("I")
26
- assert_equal 'I', msg.transaction_status
26
+ assert_equal :no_transaction, msg.transaction_status
27
27
  end
28
28
 
29
29
  def test_error_response_message
@@ -0,0 +1,19 @@
1
+ require 'test_helper'
2
+
3
+ class FrontendMessageTest < Test::Unit::TestCase
4
+
5
+ def test_copy_done_message
6
+ message = Vertica::Messages::CopyDone.new
7
+ assert_equal message.to_bytes, ['c', 0, 0, 0, 4].pack('AC4')
8
+ end
9
+
10
+ def test_copy_fail_message
11
+ message = Vertica::Messages::CopyFail.new('sad panda')
12
+ assert_equal message.to_bytes, ['f', 0, 0, 0, 14, "sad panda"].pack('AC4Z*')
13
+ end
14
+
15
+ def test_copy_data_message
16
+ message = Vertica::Messages::CopyData.new("foo|bar\n")
17
+ assert_equal message.to_bytes, ['d', 0, 0, 0, 12, "foo|bar\n"].pack('AC4A*')
18
+ end
19
+ end
@@ -24,7 +24,7 @@ class QuotingTest < Test::Unit::TestCase
24
24
 
25
25
  assert_equal "'2010-02-27'::date", Vertica.quote(Date.parse('2010-02-27'))
26
26
  assert_equal "'2010-02-27 12:44:25'::timestamp", Vertica.quote(DateTime.parse('2010-02-27 12:44:25'))
27
- assert_equal "'2010-02-27 12:44:25'::timestamp", Vertica.quote(Time.parse('2010-02-27 12:44:25'))
27
+ assert_equal "'2010-02-27 12:44:25'::timestamp", Vertica.quote(Time.utc(2010,2, 27, 12, 44, 25))
28
28
 
29
29
  assert_equal "NULL, 1, TRUE, 'test'", Vertica.quote([nil, 1, true, 'test'])
30
30
  end
metadata CHANGED
@@ -1,52 +1,49 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vertica
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0.beta4
4
5
  prerelease: 6
5
- version: 0.9.0.beta3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Jeff Smick
9
9
  - Matt Bauer
10
10
  - Willem van Bergen
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
-
15
- date: 2011-09-12 00:00:00 -04:00
14
+ date: 2011-11-01 00:00:00.000000000 -04:00
16
15
  default_executable:
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
19
18
  name: rake
20
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: &2164348960 !ruby/object:Gem::Requirement
21
20
  none: false
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: "0"
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '0'
26
25
  type: :runtime
27
26
  prerelease: false
28
- version_requirements: *id001
29
- - !ruby/object:Gem::Dependency
27
+ version_requirements: *2164348960
28
+ - !ruby/object:Gem::Dependency
30
29
  name: jeweler
31
- requirement: &id002 !ruby/object:Gem::Requirement
30
+ requirement: &2161867140 !ruby/object:Gem::Requirement
32
31
  none: false
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: "0"
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
37
36
  type: :runtime
38
37
  prerelease: false
39
- version_requirements: *id002
38
+ version_requirements: *2161867140
40
39
  description: Query Vertica with ruby
41
40
  email: sprsquish@gmail.com
42
41
  executables: []
43
-
44
42
  extensions: []
45
-
46
- extra_rdoc_files:
43
+ extra_rdoc_files:
47
44
  - LICENSE
48
45
  - README.md
49
- files:
46
+ files:
50
47
  - Gemfile
51
48
  - Gemfile.lock
52
49
  - LICENSE
@@ -61,12 +58,12 @@ files:
61
58
  - lib/vertica/messages/backend_messages/bind_complete.rb
62
59
  - lib/vertica/messages/backend_messages/close_complete.rb
63
60
  - lib/vertica/messages/backend_messages/command_complete.rb
61
+ - lib/vertica/messages/backend_messages/copy_in_response.rb
64
62
  - lib/vertica/messages/backend_messages/data_row.rb
65
63
  - lib/vertica/messages/backend_messages/empty_query_response.rb
66
64
  - lib/vertica/messages/backend_messages/error_response.rb
67
65
  - lib/vertica/messages/backend_messages/no_data.rb
68
66
  - lib/vertica/messages/backend_messages/notice_response.rb
69
- - lib/vertica/messages/backend_messages/notification_response.rb
70
67
  - lib/vertica/messages/backend_messages/parameter_description.rb
71
68
  - lib/vertica/messages/backend_messages/parameter_status.rb
72
69
  - lib/vertica/messages/backend_messages/parse_complete.rb
@@ -77,6 +74,9 @@ files:
77
74
  - lib/vertica/messages/frontend_messages/bind.rb
78
75
  - lib/vertica/messages/frontend_messages/cancel_request.rb
79
76
  - lib/vertica/messages/frontend_messages/close.rb
77
+ - lib/vertica/messages/frontend_messages/copy_data.rb
78
+ - lib/vertica/messages/frontend_messages/copy_done.rb
79
+ - lib/vertica/messages/frontend_messages/copy_fail.rb
80
80
  - lib/vertica/messages/frontend_messages/describe.rb
81
81
  - lib/vertica/messages/frontend_messages/execute.rb
82
82
  - lib/vertica/messages/frontend_messages/flush.rb
@@ -88,46 +88,45 @@ files:
88
88
  - lib/vertica/messages/frontend_messages/sync.rb
89
89
  - lib/vertica/messages/frontend_messages/terminate.rb
90
90
  - lib/vertica/messages/message.rb
91
- - lib/vertica/notification.rb
91
+ - lib/vertica/query.rb
92
92
  - lib/vertica/result.rb
93
93
  - test/functional/connection_test.rb
94
94
  - test/functional/query_test.rb
95
95
  - test/functional/value_conversion_test.rb
96
96
  - test/test_helper.rb
97
97
  - test/unit/backend_message_test.rb
98
+ - test/unit/frontend_message_test.rb
98
99
  - test/unit/quoting_test.rb
99
100
  has_rdoc: true
100
101
  homepage: http://github.com/sprsquish/vertica
101
102
  licenses: []
102
-
103
103
  post_install_message:
104
104
  rdoc_options: []
105
-
106
- require_paths:
105
+ require_paths:
107
106
  - lib
108
- required_ruby_version: !ruby/object:Gem::Requirement
107
+ required_ruby_version: !ruby/object:Gem::Requirement
109
108
  none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: "0"
114
- required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
114
  none: false
116
- requirements:
117
- - - ">"
118
- - !ruby/object:Gem::Version
115
+ requirements:
116
+ - - ! '>'
117
+ - !ruby/object:Gem::Version
119
118
  version: 1.3.1
120
119
  requirements: []
121
-
122
120
  rubyforge_project:
123
121
  rubygems_version: 1.6.2
124
122
  signing_key:
125
123
  specification_version: 3
126
124
  summary: Pure ruby library for interacting with Vertica
127
- test_files:
125
+ test_files:
128
126
  - test/functional/connection_test.rb
129
127
  - test/functional/query_test.rb
130
128
  - test/functional/value_conversion_test.rb
131
129
  - test/test_helper.rb
132
130
  - test/unit/backend_message_test.rb
131
+ - test/unit/frontend_message_test.rb
133
132
  - test/unit/quoting_test.rb
@@ -1,13 +0,0 @@
1
- module Vertica
2
- module Messages
3
- class NotificationResponse < BackendMessage
4
- message_id 'A'
5
-
6
- attr_reader :pid, :condition, :addition_info
7
-
8
- def initialize(data)
9
- @pid, @condition, @addition_info = data.unpack('NZ*Z*')
10
- end
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- module Vertica
2
- class Notification
3
- attr_reader :process_pid
4
- attr_reader :condition
5
- attr_reader :additional_info
6
-
7
- def initialize(process_pid, condition, additional_info)
8
- @process_pid = process_pid
9
- @condition = condition
10
- @additional_info = additional_info
11
- end
12
- end
13
- end