extralite 1.24 → 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/.github/workflows/test.yml +1 -1
- data/.yardopts +8 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/ext/extralite/extconf.rb +1 -0
- data/ext/extralite/prepared_statement.c +6 -0
- data/extralite-bundle.gemspec +1 -0
- data/extralite.gemspec +2 -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 -4
- data/ext/sqlite3/sqlite3.c +0 -243616
- data/ext/sqlite3/sqlite3.h +0 -12894
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 459a362b27b2061131a291b8e8b7f73fbc226847f17973de29771af1b3ff694c
|
4
|
+
data.tar.gz: 0774ca30f4107711a9fe79ffde59e606073bf5f95c0de1f12bc0e1c14876560a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b7ca365d43357ebbdaed90d18299bdae324fc2526c5206c5810c447bf59aecd56202991a5d46290da3097d6a73605297cb6ed769b53e402b6e1d18099c054d0
|
7
|
+
data.tar.gz: b6f2b2a578896df9154e3db60a0f84a6afc5c0fee6d4a650b259d3f757dda94c763ad37a6d9c6e428cc92db8311acb0861072b63cfd841d3eb6fca2e84dd3d60
|
data/.github/FUNDING.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
github:
|
1
|
+
github: noteflakes
|
data/.github/workflows/test.yml
CHANGED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/ext/extralite/extconf.rb
CHANGED
data/extralite-bundle.gemspec
CHANGED
data/extralite.gemspec
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
|
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
|
@@ -107,8 +108,6 @@ files:
|
|
107
108
|
- ext/extralite/extralite_ext.c
|
108
109
|
- ext/extralite/extralite_sqlite3.c
|
109
110
|
- ext/extralite/prepared_statement.c
|
110
|
-
- ext/sqlite3/sqlite3.c
|
111
|
-
- ext/sqlite3/sqlite3.h
|
112
111
|
- extralite-bundle.gemspec
|
113
112
|
- extralite.gemspec
|
114
113
|
- gemspec.rb
|