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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a10ca4157a897dc0bb8ace86cdcd481ac5fcfa9040e94599182c7b0555bcfed1
4
- data.tar.gz: 2566c686e1ad3d497e5275ea93d3f35a397760e61f5bb406696b3f795e7b6912
3
+ metadata.gz: 566a896b52bee42cadd627b119dc198f7ee8b958acb7c2d73f8f5e77c4dc19e9
4
+ data.tar.gz: 7e95e8d41d675aea693e5f79442f1d8d484ea8b2fde52d1e8105bfd0241b9428
5
5
  SHA512:
6
- metadata.gz: 1e447ca66457de2fbc638aa29df61a91d5b5366c9f759cf1a75466e94eed9d2cb8d9dc9f45dd1ca5f52bc3d191373c8a12d5a13b3065ed7b6fbd938b939ca358
7
- data.tar.gz: e2cc6c0f43ebcc4a956e6c2d1027b713de29d64025950ce71d5c073af1ffb92b2b35a493bcf04cefe6ae5ce9df8372f6f9319888019fdba659acec2a3411bdd9
6
+ metadata.gz: c4c392e07f2375665e2be172b3b0fafda12832bb49fd0e8bafa2aa99501640695847290aef6a13cdbd11077a69bba1708a5fb9532707510e00ca48cbcbefce6b
7
+ data.tar.gz: bb306af730a61fdb406881ad2f090b7b60223b81830e54ff7d682573162a1d6d9745608da0ba8fcb6b4aa17c8a547c884ace734981c058b79f68e9cd23bd028b
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-bundle
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