amalgalite 1.7.0-x64-mingw32 → 1.8.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -331,12 +331,34 @@ struct sqlite3_api_routines {
331
331
  const char *(*filename_journal)(const char*);
332
332
  const char *(*filename_wal)(const char*);
333
333
  /* Version 3.32.0 and later */
334
- char *(*create_filename)(const char*,const char*,const char*,
334
+ const char *(*create_filename)(const char*,const char*,const char*,
335
335
  int,const char**);
336
- void (*free_filename)(char*);
336
+ void (*free_filename)(const char*);
337
337
  sqlite3_file *(*database_file_object)(const char*);
338
338
  /* Version 3.34.0 and later */
339
339
  int (*txn_state)(sqlite3*,const char*);
340
+ /* Version 3.36.1 and later */
341
+ sqlite3_int64 (*changes64)(sqlite3*);
342
+ sqlite3_int64 (*total_changes64)(sqlite3*);
343
+ /* Version 3.37.0 and later */
344
+ int (*autovacuum_pages)(sqlite3*,
345
+ unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
346
+ void*, void(*)(void*));
347
+ /* Version 3.38.0 and later */
348
+ int (*error_offset)(sqlite3*);
349
+ int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**);
350
+ int (*vtab_distinct)(sqlite3_index_info*);
351
+ int (*vtab_in)(sqlite3_index_info*,int,int);
352
+ int (*vtab_in_first)(sqlite3_value*,sqlite3_value**);
353
+ int (*vtab_in_next)(sqlite3_value*,sqlite3_value**);
354
+ /* Version 3.39.0 and later */
355
+ int (*deserialize)(sqlite3*,const char*,unsigned char*,
356
+ sqlite3_int64,sqlite3_int64,unsigned);
357
+ unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*,
358
+ unsigned int);
359
+ const char *(*db_name)(sqlite3*,int);
360
+ /* Version 3.40.0 and later */
361
+ int (*value_encoding)(sqlite3_value*);
340
362
  };
341
363
 
342
364
  /*
@@ -643,6 +665,26 @@ typedef int (*sqlite3_loadext_entry)(
643
665
  #define sqlite3_database_file_object sqlite3_api->database_file_object
644
666
  /* Version 3.34.0 and later */
645
667
  #define sqlite3_txn_state sqlite3_api->txn_state
668
+ /* Version 3.36.1 and later */
669
+ #define sqlite3_changes64 sqlite3_api->changes64
670
+ #define sqlite3_total_changes64 sqlite3_api->total_changes64
671
+ /* Version 3.37.0 and later */
672
+ #define sqlite3_autovacuum_pages sqlite3_api->autovacuum_pages
673
+ /* Version 3.38.0 and later */
674
+ #define sqlite3_error_offset sqlite3_api->error_offset
675
+ #define sqlite3_vtab_rhs_value sqlite3_api->vtab_rhs_value
676
+ #define sqlite3_vtab_distinct sqlite3_api->vtab_distinct
677
+ #define sqlite3_vtab_in sqlite3_api->vtab_in
678
+ #define sqlite3_vtab_in_first sqlite3_api->vtab_in_first
679
+ #define sqlite3_vtab_in_next sqlite3_api->vtab_in_next
680
+ /* Version 3.39.0 and later */
681
+ #ifndef SQLITE_OMIT_DESERIALIZE
682
+ #define sqlite3_deserialize sqlite3_api->deserialize
683
+ #define sqlite3_serialize sqlite3_api->serialize
684
+ #endif
685
+ #define sqlite3_db_name sqlite3_api->db_name
686
+ /* Version 3.40.0 and later */
687
+ #define sqlite3_value_encoding sqlite3_api->value_encoding
646
688
  #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
647
689
 
648
690
  #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -15,14 +15,15 @@ module Amalgalite
15
15
  @database = database
16
16
  @table_name = table_name
17
17
  @table = @database.schema.tables[@table_name]
18
- @options = options
18
+ @options = options.dup
19
+ @encoding = options.delete("encoding") || "UTF-8"
19
20
  validate
20
21
  end
21
22
 
22
23
  def run
23
24
  @database.transaction do |db|
24
25
  db.prepare( insert_sql ) do |stmt|
25
- ::CSV.foreach( @csv_path, **@options ) do |row|
26
+ ::CSV.foreach( @csv_path, "r:#{@encoding}", **@options ) do |row|
26
27
  stmt.execute( row )
27
28
  end
28
29
  end
@@ -4,5 +4,5 @@
4
4
  #++
5
5
 
6
6
  module Amalgalite
7
- VERSION = "1.7.0"
7
+ VERSION = "1.8.0"
8
8
  end
@@ -7,21 +7,21 @@ describe "Amalgalite::SQLite3::Version" do
7
7
  expect(Amalgalite::SQLite3::Version.to_s).to match( /\d+\.\d+\.\d+/ )
8
8
  expect(Amalgalite::SQLite3::Version.runtime_version).to match( /\d+\.\d+\.\d+/ )
9
9
 
10
- Amalgalite::SQLite3::Version.to_i.should eql(3034000)
11
- Amalgalite::SQLite3::Version.runtime_version_number.should eql(3034000)
10
+ Amalgalite::SQLite3::Version.to_i.should eql(3040001)
11
+ Amalgalite::SQLite3::Version.runtime_version_number.should eql(3040001)
12
12
 
13
13
  Amalgalite::SQLite3::Version::MAJOR.should eql(3)
14
- Amalgalite::SQLite3::Version::MINOR.should eql(34)
15
- Amalgalite::SQLite3::Version::RELEASE.should eql(0)
14
+ Amalgalite::SQLite3::Version::MINOR.should eql(40)
15
+ Amalgalite::SQLite3::Version::RELEASE.should eql(1)
16
16
  expect(Amalgalite::SQLite3::Version.to_a.size).to eql(3)
17
17
 
18
- Amalgalite::SQLite3::Version.compiled_version.should be == "3.34.0"
19
- Amalgalite::SQLite3::Version.compiled_version_number.should be == 3034000
18
+ Amalgalite::SQLite3::Version.compiled_version.should be == "3.40.1"
19
+ Amalgalite::SQLite3::Version.compiled_version_number.should be == 3040001
20
20
  Amalgalite::SQLite3::Version.compiled_matches_runtime?.should be == true
21
21
  end
22
22
 
23
23
  it "should have the sqlite3 source id" do
24
- source_id = "2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b"
24
+ source_id = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24"
25
25
  Amalgalite::SQLite3::Version.compiled_source_id.should be == source_id
26
26
  Amalgalite::SQLite3::Version.runtime_source_id.should be == source_id
27
27
  end
data/tasks/custom.rake CHANGED
@@ -63,7 +63,7 @@ namespace :util do
63
63
 
64
64
  require 'uri'
65
65
  require 'open-uri'
66
- require 'zip'
66
+ require 'archive/zip'
67
67
 
68
68
  parts = version.split(".")
69
69
  next_version = [ parts.shift.to_s ]
@@ -79,22 +79,21 @@ namespace :util do
79
79
  file = "tmp/#{File.basename( url.path ) }"
80
80
  FileUtils.mkdir "tmp" unless File.directory?( "tmp" )
81
81
  File.open( file, "wb+") do |f|
82
- open(url) do |input|
82
+ url.open do |input|
83
83
  f.write( input.read )
84
84
  end
85
85
  end
86
86
 
87
87
  puts "extracting..."
88
88
  upstream_files = %w[ sqlite3.h sqlite3.c sqlite3ext.h ]
89
- Zip::ZipInputStream.open( file ) do |io|
90
- loop do
91
- entry = io.get_next_entry
92
- break unless entry
93
- bname = File.basename( entry.name )
89
+ Archive::Zip.open( file ) do |archive|
90
+ archive.each do |entry|
91
+ next unless entry.file?
92
+ bname = File.basename( entry.zip_path)
94
93
  if upstream_files.include?( bname ) then
95
94
  dest_file = File.join( "ext", "amalgalite", "c", bname )
96
95
  puts "updating #{dest_file}"
97
- entry.extract( dest_file ) { true }
96
+ entry.extract(file_path: dest_file)
98
97
  end
99
98
  end
100
99
  end
data/tasks/default.rake CHANGED
@@ -39,7 +39,11 @@ begin
39
39
  require 'rspec/core/rake_task'
40
40
  RSpec::Core::RakeTask.new( :test ) do |t|
41
41
  t.ruby_opts = %w[ -w ]
42
- t.rspec_opts = %w[ --color --format documentation ]
42
+ t.rspec_opts = %w[
43
+ --color
44
+ --format documentation
45
+ --format RspecJunitFormatter --out tmp/report.xml
46
+ ]
43
47
  end
44
48
  task :test_requirements
45
49
  task :test => :test_requirements
@@ -157,7 +161,7 @@ namespace :fixme do
157
161
  end
158
162
 
159
163
  desc "See if the fixme tools are outdated"
160
- task :outdated => :release_check do
164
+ task :outdated do
161
165
  if fixme_up_to_date? then
162
166
  puts "Fixme files are up to date."
163
167
  else
@@ -168,7 +172,7 @@ namespace :fixme do
168
172
  end
169
173
 
170
174
  desc "Update outdated fixme files"
171
- task :update => :release_check do
175
+ task :update do
172
176
  if fixme_up_to_date? then
173
177
  puts "Fixme files are already up to date."
174
178
  else
@@ -199,7 +203,7 @@ task :gemspec do
199
203
  end
200
204
 
201
205
  # .rbc files from ruby 2.0
202
- CLOBBER << FileList["**/*.rbc"]
206
+ CLOBBER << "**/*.rbc"
203
207
 
204
208
  # The standard gem packaging task, everyone has it.
205
209
  require 'rubygems/package_task'
@@ -211,19 +215,19 @@ end
211
215
  # Release - the steps we go through to do a final release, this is pulled from
212
216
  # a compbination of mojombo's rakegem, hoe and hoe-git
213
217
  #
214
- # 1) make sure we are on the master branch
218
+ # 1) make sure we are on the main branch
215
219
  # 2) make sure there are no uncommitted items
216
220
  # 3) check the manifest and make sure all looks good
217
221
  # 4) build the gem
218
222
  # 5) do an empty commit to have the commit message of the version
219
223
  # 6) tag that commit as the version
220
- # 7) push master
224
+ # 7) push main
221
225
  # 8) push the tag
222
226
  # 7) pus the gem
223
227
  #------------------------------------------------------------------------------
224
228
  task :release_check do
225
- unless `git branch` =~ /^\* master$/
226
- abort "You must be on the master branch to release!"
229
+ unless `git branch` =~ /^\* main/
230
+ abort "You must be on the main branch to release!"
227
231
  end
228
232
  unless `git status` =~ /^nothing to commit/m
229
233
  abort "Nope, sorry, you have unfinished business"
@@ -234,7 +238,7 @@ desc "Create tag v#{This.version}, build and push #{This.platform_gemspec.full_n
234
238
  task :release => [ :release_check, 'manifest:check', :gem ] do
235
239
  sh "git commit --allow-empty -a -m 'Release #{This.version}'"
236
240
  sh "git tag -a -m 'v#{This.version}' v#{This.version}"
237
- sh "git push origin master"
241
+ sh "git push origin main"
238
242
  sh "git push origin v#{This.version}"
239
243
  sh "gem push pkg/#{This.platform_gemspec.full_name}.gem"
240
244
  end
data/tasks/extension.rake CHANGED
@@ -6,27 +6,17 @@
6
6
  # in your top level rakefile
7
7
  begin
8
8
  require 'rake/extensiontask'
9
- require 'rake/javaextensiontask'
9
+ Rake::ExtensionTask.new( This.name ) do |ext|
10
+ ext.ext_dir = File.join( 'ext', This.name, "c" )
11
+ ext.lib_dir = File.join( 'lib', This.name )
12
+ ext.gem_spec = This.ruby_gemspec
10
13
 
11
- if RUBY_PLATFORM == "java" then
12
-
13
- Rake::JavaExtensionTask.new( This.name) do |ext|
14
- ext.ext_dir = File.join( 'ext', This.name, "java" )
15
- ext.lib_dir = File.join( 'lib', This.name )
16
- ext.gem_spec = This.java_gemspec
17
- end
18
-
19
- else
20
-
21
- Rake::ExtensionTask.new( This.name ) do |ext|
22
- ext.ext_dir = File.join( 'ext', This.name, "c" )
23
- ext.lib_dir = File.join( 'lib', This.name )
24
- ext.gem_spec = This.ruby_gemspec
25
-
26
- ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
27
- ext.cross_platform = %w[x86-mingw32 x64-mingw32] # forces the Windows platform instead of the default one
28
- # configure options only for cross compile
29
- end
14
+ ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
15
+ ext.cross_platform = %w[
16
+ x86-mingw32
17
+ x64-mingw-ucrt
18
+ x64-mingw32
19
+ ]
30
20
  end
31
21
 
32
22
  task :test_requirements => :compile
@@ -34,5 +24,5 @@ rescue LoadError
34
24
  This.task_warning( 'extension' )
35
25
  end
36
26
 
37
- CLOBBER << FileList["lib/**/*.{jar,so,bundle}"]
38
- CLOBBER << FileList["lib/#{This.name}/{1,2,3}.*/"]
27
+ CLOBBER << "lib/**/*.{jar,so,bundle}"
28
+ CLOBBER << "lib/#{This.name}/{1,2,3}.*/"
data/tasks/this.rb CHANGED
@@ -25,10 +25,10 @@ class ThisProject
25
25
  #
26
26
  # Yields self
27
27
  def initialize(&block)
28
- @exclude_from_manifest = Regexp.union(/\.(git|DS_Store|ruby-version)/,
29
- /^(doc|coverage|pkg|tmp|.semaphore|Gemfile(\.lock)?)/,
28
+ @exclude_from_manifest = Regexp.union(/\.(git|DS_Store|semaphore)/,
29
+ /^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)/,
30
30
  /^[^\/]+\.gemspec/,
31
- /\.(swp|jar|bundle|so|rvmrc|travis.yml|byebug_history)$/,
31
+ /\.(swp|jar|bundle|so|rvmrc|travis.yml|byebug_history|fossa.yml|ruby-version)$/,
32
32
  /~$/)
33
33
  @gemspecs = Hash.new
34
34
  yield self if block_given?
@@ -135,7 +135,7 @@ class ThisProject
135
135
  spec.homepage = homepage
136
136
 
137
137
  spec.summary = summary
138
- spec.description = description
138
+ spec.description = summary
139
139
  spec.license = license
140
140
 
141
141
  spec.files = manifest
@@ -185,7 +185,7 @@ class ThisProject
185
185
 
186
186
  # Internal: Return the summary text from the README
187
187
  def summary
188
- description_section.first
188
+ description_section.first.gsub(/\s+/, ' ')
189
189
  end
190
190
 
191
191
  # Internal: Return the full description text from the README
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amalgalite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-13 00:00:00.000000000 Z
11
+ date: 2023-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arrayfields
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '3.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '3.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec_junit_formatter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.6'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -58,80 +72,72 @@ dependencies:
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '1.0'
75
+ version: '1.2'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '1.0'
82
+ version: '1.2'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rake-compiler-dock
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0.6'
89
+ version: '1.2'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0.6'
96
+ version: '1.2'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rdoc
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '6.0'
103
+ version: '6.5'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '6.0'
110
+ version: '6.5'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: simplecov
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0.14'
117
+ version: '0.21'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0.14'
124
+ version: '0.21'
111
125
  - !ruby/object:Gem::Dependency
112
- name: zip
126
+ name: archive-zip
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '2.0'
131
+ version: '0.12'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '2.0'
125
- description: 'Amalgalite embeds the SQLite database engine in a ruby extension. There
126
- is no need to install SQLite separately. Look in the examples/ directory to see
127
- * general usage * blob io * schema information * custom functions * custom aggregates
128
- * requiring ruby code from a database * full text search Also Scroll through Amalgalite::Database
129
- for a quick example, and a general overview of the API. Amalgalite adds in the following
130
- additional non-default SQLite extensions: * (http://sqlite.org/rtree.html) * (http://sqlite.org/fts5.html)
131
- - both fts3 and fts5 * (https://www.sqlite.org/geopoly.html) * (https://www.sqlite.org/json1.html)
132
- Other extensions are add that might not be usable/visible by users of the gem. The
133
- full list of extensions added is in (ext/amalgalite/c/extconf.rb). And those may
134
- be cross referenced against the (https://www.sqlite.org/compile.html)'
138
+ version: '0.12'
139
+ description: Amalgalite embeds the SQLite database engine as a ruby extension. There
140
+ is no need to install SQLite separately.
135
141
  email: jeremy@copiousfreetime.org
136
142
  executables:
137
143
  - amalgalite-pack
@@ -179,11 +185,11 @@ files:
179
185
  - ext/amalgalite/c/sqlite3_options.h
180
186
  - ext/amalgalite/c/sqlite3ext.h
181
187
  - lib/amalgalite.rb
182
- - lib/amalgalite/2.2/amalgalite.so
183
- - lib/amalgalite/2.3/amalgalite.so
184
188
  - lib/amalgalite/2.4/amalgalite.so
185
189
  - lib/amalgalite/2.5/amalgalite.so
186
190
  - lib/amalgalite/2.6/amalgalite.so
191
+ - lib/amalgalite/2.7/amalgalite.so
192
+ - lib/amalgalite/3.0/amalgalite.so
187
193
  - lib/amalgalite/aggregate.rb
188
194
  - lib/amalgalite/blob.rb
189
195
  - lib/amalgalite/boolean.rb
@@ -258,7 +264,7 @@ files:
258
264
  - tasks/this.rb
259
265
  homepage: http://github.com/copiousfreetime/amalgalite
260
266
  licenses:
261
- - BSD
267
+ - BSD-3-Clause
262
268
  metadata: {}
263
269
  post_install_message:
264
270
  rdoc_options:
@@ -272,20 +278,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
278
  requirements:
273
279
  - - ">="
274
280
  - !ruby/object:Gem::Version
275
- version: '2.2'
281
+ version: '2.4'
276
282
  - - "<"
277
283
  - !ruby/object:Gem::Version
278
- version: 2.7.dev
284
+ version: 3.1.dev
279
285
  required_rubygems_version: !ruby/object:Gem::Requirement
280
286
  requirements:
281
287
  - - ">="
282
288
  - !ruby/object:Gem::Version
283
289
  version: '0'
284
290
  requirements: []
285
- rubygems_version: 3.1.4
291
+ rubygems_version: 3.3.4
286
292
  signing_key:
287
293
  specification_version: 4
288
- summary: Amalgalite embeds the SQLite database engine in a ruby extension. There is
294
+ summary: Amalgalite embeds the SQLite database engine as a ruby extension. There is
289
295
  no need to install SQLite separately.
290
296
  test_files:
291
297
  - spec/aggregate_spec.rb
Binary file
Binary file