cassandra_backup 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'cassandra_backup'
5
- s.version = '0.1.0'
5
+ s.version = '0.1.1'
6
6
  s.description = 'Cassandra Backup'
7
7
  s.summary = 'Cassandra Backup'
8
8
  s.authors = ['Infogroup']
@@ -16,7 +16,7 @@ module CassandraBackup
16
16
  end
17
17
 
18
18
  def execute(cql)
19
- config.connection.execute(cql)
19
+ config.connection.execute(cql) # passing an empty array ensures that no variable binding is attempted
20
20
  end
21
21
 
22
22
  def each_full_statement(io)
@@ -32,6 +32,16 @@ class CassandraBackup::ImporterTest < MiniTest::Spec
32
32
  assert_equal expected, stmts
33
33
  end
34
34
 
35
+ def test_execute_with_question_mark
36
+ importer = create_importer
37
+ importer.execute "TRUNCATE presidents"
38
+
39
+ importer.execute "INSERT INTO presidents (id, name) VALUES ('1st', '?')"
40
+
41
+ result = importer.execute("select * from presidents")
42
+ assert_equal '?', result.fetch_hash['name']
43
+ end
44
+
35
45
  private
36
46
 
37
47
  def create_importer(options = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassandra_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2012-11-02 00:00:00.000000000 Z
12
+ date: 2012-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cassandra-cql