mini_sql 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/mini_sql/mysql/connection.rb +5 -3
- data/lib/mini_sql/postgres/connection.rb +5 -3
- data/lib/mini_sql/sqlite/connection.rb +5 -3
- data/lib/mini_sql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335047554a8bf88fb9f9c3152d5f7056806ee541667ca47ffdfe678d85d16f2e
|
4
|
+
data.tar.gz: fa574144f2ca9e8427b5d72292af8fbb67e8e89b799bd2ab550639edd6f0eca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b92a31e176d19b2c006dfec04884c295e7e9d6eaf04d5222f777b2e4d012225efb8e46699b9be7ad1cd103e87cc1637096a0bbef6cae0dfec928545e5a2538
|
7
|
+
data.tar.gz: '0685f098c60980117f0278a0f0887b0bd95f6d06ace0aeeba520dd163a7422b686b7d7f4009e29de97f8b713900b206174d3765903f4b6e28c953cfd174f03c3'
|
data/CHANGELOG
CHANGED
@@ -9,12 +9,14 @@ module MiniSql
|
|
9
9
|
@raw_connection = raw_connection
|
10
10
|
@param_encoder = (args && args[:param_encoder]) || InlineParamEncoder.new(self)
|
11
11
|
@deserializer_cache = (args && args[:deserializer_cache]) || DeserializerCache.new
|
12
|
-
|
13
|
-
@prepared = PreparedConnection.new(self, @deserializer_cache)
|
14
12
|
end
|
15
13
|
|
16
14
|
def prepared(condition = true)
|
17
|
-
condition
|
15
|
+
if condition
|
16
|
+
@prepared ||= PreparedConnection.new(self, @deserializer_cache)
|
17
|
+
else
|
18
|
+
self
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
def query_single(sql, *params)
|
@@ -40,8 +40,6 @@ module MiniSql
|
|
40
40
|
@deserializer_cache = (args && args[:deserializer_cache]) || self.class.default_deserializer_cache
|
41
41
|
@param_encoder = (args && args[:param_encoder]) || InlineParamEncoder.new(self)
|
42
42
|
@type_map = args && args[:type_map]
|
43
|
-
|
44
|
-
@prepared = PreparedConnection.new(self, @deserializer_cache)
|
45
43
|
end
|
46
44
|
|
47
45
|
def type_map
|
@@ -49,7 +47,11 @@ module MiniSql
|
|
49
47
|
end
|
50
48
|
|
51
49
|
def prepared(condition = true)
|
52
|
-
condition
|
50
|
+
if condition
|
51
|
+
@prepared ||= PreparedConnection.new(self, @deserializer_cache)
|
52
|
+
else
|
53
|
+
self
|
54
|
+
end
|
53
55
|
end
|
54
56
|
|
55
57
|
# Returns a flat array containing all results.
|
@@ -9,12 +9,14 @@ module MiniSql
|
|
9
9
|
@raw_connection = raw_connection
|
10
10
|
@param_encoder = (args && args[:param_encoder]) || InlineParamEncoder.new(self)
|
11
11
|
@deserializer_cache = (args && args[:deserializer_cache]) || DeserializerCache.new
|
12
|
-
|
13
|
-
@prepared = PreparedConnection.new(self, @deserializer_cache)
|
14
12
|
end
|
15
13
|
|
16
14
|
def prepared(condition = true)
|
17
|
-
condition
|
15
|
+
if condition
|
16
|
+
@prepared ||= PreparedConnection.new(self, @deserializer_cache)
|
17
|
+
else
|
18
|
+
self
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
def query_single(sql, *params)
|
data/lib/mini_sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|