extralite-bundle 1.25 → 1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -1
- data/.yardopts +8 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/ext/extralite/extconf.rb +1 -0
- data/ext/extralite/prepared_statement.c +6 -0
- data/lib/extralite/sqlite3_constants.rb +0 -1
- data/lib/extralite/version.rb +2 -1
- data/lib/extralite.rb +1 -0
- data/lib/sequel/adapters/extralite.rb +19 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566a896b52bee42cadd627b119dc198f7ee8b958acb7c2d73f8f5e77c4dc19e9
|
4
|
+
data.tar.gz: 7e95e8d41d675aea693e5f79442f1d8d484ea8b2fde52d1e8105bfd0241b9428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4c392e07f2375665e2be172b3b0fafda12832bb49fd0e8bafa2aa99501640695847290aef6a13cdbd11077a69bba1708a5fb9532707510e00ca48cbcbefce6b
|
7
|
+
data.tar.gz: bb306af730a61fdb406881ad2f090b7b60223b81830e54ff7d682573162a1d6d9745608da0ba8fcb6b4aa17c8a547c884ace734981c058b79f68e9cd23bd028b
|
data/.github/FUNDING.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
github:
|
1
|
+
github: noteflakes
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/ext/extralite/extconf.rb
CHANGED
data/lib/extralite/version.rb
CHANGED
data/lib/extralite.rb
CHANGED
@@ -7,22 +7,28 @@
|
|
7
7
|
require 'extralite'
|
8
8
|
require 'sequel/adapters/shared/sqlite'
|
9
9
|
|
10
|
+
# @!visibility private
|
10
11
|
module Sequel
|
12
|
+
# Extralite Sequel adapter
|
11
13
|
module Extralite
|
14
|
+
# @!visibility private
|
12
15
|
FALSE_VALUES = (%w'0 false f no n'.each(&:freeze) + [0]).freeze
|
13
16
|
|
14
17
|
blob = Object.new
|
18
|
+
# @!visibility private
|
15
19
|
def blob.call(s)
|
16
20
|
Sequel::SQL::Blob.new(s.to_s)
|
17
21
|
end
|
18
22
|
|
19
23
|
boolean = Object.new
|
24
|
+
# @!visibility private
|
20
25
|
def boolean.call(s)
|
21
26
|
s = s.downcase if s.is_a?(String)
|
22
27
|
!FALSE_VALUES.include?(s)
|
23
28
|
end
|
24
29
|
|
25
30
|
date = Object.new
|
31
|
+
# @!visibility private
|
26
32
|
def date.call(s)
|
27
33
|
case s
|
28
34
|
when String
|
@@ -37,22 +43,26 @@ module Sequel
|
|
37
43
|
end
|
38
44
|
|
39
45
|
integer = Object.new
|
46
|
+
# @!visibility private
|
40
47
|
def integer.call(s)
|
41
48
|
s.to_i
|
42
49
|
end
|
43
50
|
|
44
51
|
float = Object.new
|
52
|
+
# @!visibility private
|
45
53
|
def float.call(s)
|
46
54
|
s.to_f
|
47
55
|
end
|
48
56
|
|
49
57
|
numeric = Object.new
|
58
|
+
# @!visibility private
|
50
59
|
def numeric.call(s)
|
51
60
|
s = s.to_s unless s.is_a?(String)
|
52
61
|
BigDecimal(s) rescue s
|
53
62
|
end
|
54
63
|
|
55
64
|
time = Object.new
|
65
|
+
# @!visibility private
|
56
66
|
def time.call(s)
|
57
67
|
case s
|
58
68
|
when String
|
@@ -82,8 +92,10 @@ module Sequel
|
|
82
92
|
end
|
83
93
|
SQLITE_TYPES.freeze
|
84
94
|
|
95
|
+
# @!visibility private
|
85
96
|
USE_EXTENDED_RESULT_CODES = false
|
86
97
|
|
98
|
+
# Database adapter for Sequel
|
87
99
|
class Database < Sequel::Database
|
88
100
|
include ::Sequel::SQLite::DatabaseMethods
|
89
101
|
|
@@ -157,10 +169,12 @@ module Sequel
|
|
157
169
|
end
|
158
170
|
end
|
159
171
|
|
172
|
+
# @!visibility private
|
160
173
|
def execute_insert(sql, opts=OPTS)
|
161
174
|
_execute(:insert, sql, opts)
|
162
175
|
end
|
163
176
|
|
177
|
+
# @!visibility private
|
164
178
|
def freeze
|
165
179
|
@conversion_procs.freeze
|
166
180
|
super
|
@@ -298,9 +312,11 @@ module Sequel
|
|
298
312
|
end
|
299
313
|
end
|
300
314
|
|
315
|
+
# Dataset adapter for Sequel
|
301
316
|
class Dataset < Sequel::Dataset
|
302
317
|
include ::Sequel::SQLite::DatasetMethods
|
303
318
|
|
319
|
+
# @!visibility private
|
304
320
|
module ArgumentMapper
|
305
321
|
include Sequel::Dataset::ArgumentMapper
|
306
322
|
|
@@ -323,9 +339,12 @@ module Sequel
|
|
323
339
|
end
|
324
340
|
end
|
325
341
|
|
342
|
+
# @!visibility private
|
326
343
|
BindArgumentMethods = prepared_statements_module(:bind, ArgumentMapper)
|
344
|
+
# @!visibility private
|
327
345
|
PreparedStatementMethods = prepared_statements_module(:prepare, BindArgumentMethods)
|
328
346
|
|
347
|
+
# @!visibility private
|
329
348
|
def fetch_rows(sql, &block)
|
330
349
|
execute(sql, &block)
|
331
350
|
# execute(sql) do |result|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extralite-bundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.26'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- ".github/FUNDING.yml"
|
92
92
|
- ".github/workflows/test.yml"
|
93
93
|
- ".gitignore"
|
94
|
+
- ".yardopts"
|
94
95
|
- CHANGELOG.md
|
95
96
|
- Gemfile
|
96
97
|
- Gemfile.lock
|