extralite 1.25 → 1.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a6e8245385b707be08a300ff6bb089291cfa27500fd99f35698f3dc566147e0
4
- data.tar.gz: 1bc49ffc376a8e8f17da33cda6afdd59299e9d6dac381ef2ff9c7ea8d3a92418
3
+ metadata.gz: 459a362b27b2061131a291b8e8b7f73fbc226847f17973de29771af1b3ff694c
4
+ data.tar.gz: 0774ca30f4107711a9fe79ffde59e606073bf5f95c0de1f12bc0e1c14876560a
5
5
  SHA512:
6
- metadata.gz: 1e119afa5f07f499935cd83692cb86c22c548ed7f4e35b46735860349186e66c5b1cd1ca2b32cbc8aa41c1e9106c942d38958b145480b397d838a5d75d32985f
7
- data.tar.gz: 28f0b76e7ed23e51b9f99f7a8756534163330f909668d7f2d1fa34bd1517ee37ccfdcffe18028fa51cbf427353f313256832daead4ed09a00742a4bd24236744
6
+ metadata.gz: 6b7ca365d43357ebbdaed90d18299bdae324fc2526c5206c5810c447bf59aecd56202991a5d46290da3097d6a73605297cb6ed769b53e402b6e1d18099c054d0
7
+ data.tar.gz: b6f2b2a578896df9154e3db60a0f84a6afc5c0fee6d4a650b259d3f757dda94c763ad37a6d9c6e428cc92db8311acb0861072b63cfd841d3eb6fca2e84dd3d60
data/.github/FUNDING.yml CHANGED
@@ -1 +1 @@
1
- github: ciconia
1
+ github: noteflakes
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ -o ./_yardoc
2
+ -m markdown -M redcarpet
3
+ --verbose
4
+ --protected
5
+ --no-private
6
+ --exclude sqlite3_constants.rb
7
+ ./lib
8
+ ./ext/extralite
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.26 2023-05-17
2
+
3
+ - Improve documentation
4
+
1
5
  # 1.25 2023-03-10
2
6
 
3
7
  - Remove bundled sqlite3 source files from extralite.gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- extralite (1.25)
4
+ extralite (1.26)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -56,6 +56,7 @@ else
56
56
  $CFLAGS << ' -DTAINTING_SUPPORT'
57
57
  end
58
58
 
59
+ # @!visibility private
59
60
  def asplode missing
60
61
  if RUBY_PLATFORM =~ /mingw|mswin/
61
62
  abort "#{missing} is missing. Install SQLite3 from " +
@@ -1,6 +1,12 @@
1
1
  #include <stdio.h>
2
2
  #include "extralite.h"
3
3
 
4
+ /*
5
+ * Document-class: Extralite::PreparedStatement
6
+ *
7
+ * This class represents a prepared statement.
8
+ */
9
+
4
10
  VALUE cPreparedStatement;
5
11
 
6
12
  static size_t PreparedStatement_size(const void *ptr) {
@@ -1,5 +1,4 @@
1
1
  module Extralite
2
-
3
2
  SQLITE_STATUS_MEMORY_USED = 0
4
3
  SQLITE_STATUS_PAGECACHE_USED = 1
5
4
  SQLITE_STATUS_PAGECACHE_OVERFLOW = 2
@@ -1,3 +1,4 @@
1
1
  module Extralite
2
- VERSION = '1.25'
2
+ # Extralite version
3
+ VERSION = '1.26'
3
4
  end
data/lib/extralite.rb CHANGED
@@ -29,6 +29,7 @@ module Extralite
29
29
  class Database
30
30
  alias_method :execute, :query
31
31
 
32
+ # @!visibility private
32
33
  TABLES_SQL = <<~SQL
33
34
  SELECT name FROM sqlite_master
34
35
  WHERE type ='table'
@@ -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.25'
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-03-10 00:00:00.000000000 Z
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