ciql 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ciql.rb +2 -0
- data/lib/ciql/client/binary.rb +11 -10
- data/lib/ciql/rails.rb +1 -1
- data/lib/ciql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0c24dfc6f7e95361c405a08d552c4e88b296e79
|
4
|
+
data.tar.gz: b4f6eae5dc11907751b959994858cbd663ecdca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 371cc72b3bf7886fe99c124ab5a18be855c07e5a6867d2a5c27bea4de40de6cf13a96f0a8b51b79a8e29c760b6a0d803be6e2366c56fa0725233fcfefc9079d4
|
7
|
+
data.tar.gz: 2948ca1f3c9c7e8d812aade4f5436b2e56a01559dcfd8a3a11e462458a7602cc9dd220b78705992f4589484ff6ff3d6d1c3b0abd72c6bba9b006e702fd59f422
|
data/lib/ciql.rb
CHANGED
data/lib/ciql/client/binary.rb
CHANGED
@@ -7,16 +7,17 @@ module Ciql::Client
|
|
7
7
|
class Binary
|
8
8
|
include Log
|
9
9
|
|
10
|
-
attr_reader :connection
|
11
|
-
|
12
10
|
def initialize(options={})
|
13
|
-
options
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
@options = {
|
12
|
+
logger: Ciql.logger,
|
13
|
+
connections_per_node: 2,
|
14
|
+
}.merge(options)
|
15
|
+
@log_format = @options.delete(:log_format)
|
16
|
+
@options[:hosts] = @options.delete(:host) { '127.0.0.1' }.split(',')
|
17
|
+
end
|
18
18
|
|
19
|
-
|
19
|
+
def connection
|
20
|
+
@connection ||= Cql::Client.connect(@options)
|
20
21
|
end
|
21
22
|
|
22
23
|
def execute(statement, *arguments)
|
@@ -26,7 +27,7 @@ module Ciql::Client
|
|
26
27
|
|
27
28
|
result = nil
|
28
29
|
times = Benchmark.measure do
|
29
|
-
result =
|
30
|
+
result = connection.execute(
|
30
31
|
bound_statement,
|
31
32
|
consistency: consistency_level
|
32
33
|
)
|
@@ -42,7 +43,7 @@ module Ciql::Client
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def disconnect!
|
45
|
-
|
46
|
+
connection.close
|
46
47
|
end
|
47
48
|
end
|
48
49
|
end
|
data/lib/ciql/rails.rb
CHANGED
data/lib/ciql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ciql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Bradford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cql-rb
|