mini_sql 1.0 → 1.0.1
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/inline_param_encoder.rb +0 -2
- data/lib/mini_sql/mysql/connection.rb +3 -1
- data/lib/mini_sql/postgres/connection.rb +9 -3
- data/lib/mini_sql/postgres_jdbc/connection.rb +3 -1
- data/lib/mini_sql/sqlite/connection.rb +3 -1
- data/lib/mini_sql/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a25d1d6af83ae3c2f74f85c4a920a2a1019324ce8904bf3feda15b4ee486df
|
4
|
+
data.tar.gz: 5d686631612a51a4134cf964c40bb41a883e19fa9847498668eca9f03e2f9816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c862314017d5be1cfe429b1632ae350d3f123ef7312506437eec04f9023e309dbdb7c366eb6afe88d65d4137accd43627856ae823bc11707a51c358219a19ed
|
7
|
+
data.tar.gz: 6e3ac51e042bdbaff790a272c8e9207512d436493b005a4fe268128204125e44c3a955eef9ae38a3db2e07f207f86ee4dedbaa59145f0257055347581434b79f
|
data/CHANGELOG
CHANGED
@@ -97,7 +97,9 @@ module MiniSql
|
|
97
97
|
|
98
98
|
def query_each(sql, *params)
|
99
99
|
raise StandardError, "Please supply a block when calling query_each" if !block_given?
|
100
|
-
|
100
|
+
if params && params.length > 0
|
101
|
+
sql = param_encoder.encode(sql, *params)
|
102
|
+
end
|
101
103
|
|
102
104
|
raw_connection.send_query(sql)
|
103
105
|
raw_connection.set_single_row_mode
|
@@ -128,7 +130,9 @@ module MiniSql
|
|
128
130
|
|
129
131
|
def query_each_hash(sql, *params)
|
130
132
|
raise StandardError, "Please supply a block when calling query_each_hash" if !block_given?
|
131
|
-
|
133
|
+
if params && params.length > 0
|
134
|
+
sql = param_encoder.encode(sql, *params)
|
135
|
+
end
|
132
136
|
|
133
137
|
raw_connection.send_query(sql)
|
134
138
|
raw_connection.set_single_row_mode
|
@@ -191,7 +195,9 @@ module MiniSql
|
|
191
195
|
private
|
192
196
|
|
193
197
|
def run(sql, params)
|
194
|
-
|
198
|
+
if params && params.length > 0
|
199
|
+
sql = param_encoder.encode(sql, *params)
|
200
|
+
end
|
195
201
|
raw_connection.async_exec(sql)
|
196
202
|
end
|
197
203
|
|
@@ -89,7 +89,9 @@ module MiniSql
|
|
89
89
|
private
|
90
90
|
|
91
91
|
def run(sql, params)
|
92
|
-
|
92
|
+
if params && params.length > 0
|
93
|
+
sql = param_encoder.encode(sql, *params)
|
94
|
+
end
|
93
95
|
conn = raw_connection
|
94
96
|
conn.typemap = self.class.typemap
|
95
97
|
conn.execute(sql)
|
@@ -63,7 +63,9 @@ module MiniSql
|
|
63
63
|
private
|
64
64
|
|
65
65
|
def run(sql, *params)
|
66
|
-
|
66
|
+
if params && params.length > 0
|
67
|
+
sql = param_encoder.encode(sql, *params)
|
68
|
+
end
|
67
69
|
if block_given?
|
68
70
|
stmt = SQLite3::Statement.new(raw_connection, sql)
|
69
71
|
yield stmt.execute
|
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:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
requirements: []
|
245
|
-
rubygems_version: 3.2.
|
245
|
+
rubygems_version: 3.2.2
|
246
246
|
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: A fast, safe, simple direct SQL executor
|