amalgalite 1.5.0-x86-mingw32 → 1.6.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,12 +15,10 @@
15
15
  ** as extensions by SQLite should #include this file instead of
16
16
  ** sqlite3.h.
17
17
  */
18
- #ifndef _SQLITE3EXT_H_
19
- #define _SQLITE3EXT_H_
18
+ #ifndef SQLITE3EXT_H
19
+ #define SQLITE3EXT_H
20
20
  #include "sqlite3.h"
21
21
 
22
- typedef struct sqlite3_api_routines sqlite3_api_routines;
23
-
24
22
  /*
25
23
  ** The following structure holds pointers to all of the SQLite API
26
24
  ** routines.
@@ -136,7 +134,7 @@ struct sqlite3_api_routines {
136
134
  int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
137
135
  const char*,const char*),void*);
138
136
  void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
139
- char * (*snprintf)(int,char*,const char*,...);
137
+ char * (*xsnprintf)(int,char*,const char*,...);
140
138
  int (*step)(sqlite3_stmt*);
141
139
  int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
142
140
  char const**,char const**,int*,int*,int*);
@@ -248,7 +246,7 @@ struct sqlite3_api_routines {
248
246
  int (*uri_boolean)(const char*,const char*,int);
249
247
  sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
250
248
  const char *(*uri_parameter)(const char*,const char*);
251
- char *(*vsnprintf)(int,char*,const char*,va_list);
249
+ char *(*xvsnprintf)(int,char*,const char*,va_list);
252
250
  int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
253
251
  /* Version 3.8.7 and later */
254
252
  int (*auto_extension)(void(*)(void));
@@ -275,8 +273,37 @@ struct sqlite3_api_routines {
275
273
  /* Version 3.9.0 and later */
276
274
  unsigned int (*value_subtype)(sqlite3_value*);
277
275
  void (*result_subtype)(sqlite3_context*,unsigned int);
276
+ /* Version 3.10.0 and later */
277
+ int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
278
+ int (*strlike)(const char*,const char*,unsigned int);
279
+ int (*db_cacheflush)(sqlite3*);
280
+ /* Version 3.12.0 and later */
281
+ int (*system_errno)(sqlite3*);
282
+ /* Version 3.14.0 and later */
283
+ int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
284
+ char *(*expanded_sql)(sqlite3_stmt*);
285
+ /* Version 3.18.0 and later */
286
+ void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
287
+ /* Version 3.20.0 and later */
288
+ int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,
289
+ sqlite3_stmt**,const char**);
290
+ int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
291
+ sqlite3_stmt**,const void**);
292
+ int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
293
+ void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
294
+ void *(*value_pointer)(sqlite3_value*,const char*);
278
295
  };
279
296
 
297
+ /*
298
+ ** This is the function signature used for all extension entry points. It
299
+ ** is also defined in the file "loadext.c".
300
+ */
301
+ typedef int (*sqlite3_loadext_entry)(
302
+ sqlite3 *db, /* Handle to the database. */
303
+ char **pzErrMsg, /* Used to set error string on failure. */
304
+ const sqlite3_api_routines *pThunk /* Extension API function pointers. */
305
+ );
306
+
280
307
  /*
281
308
  ** The following macros redefine the API routines so that they are
282
309
  ** redirected through the global sqlite3_api structure.
@@ -391,7 +418,7 @@ struct sqlite3_api_routines {
391
418
  #define sqlite3_rollback_hook sqlite3_api->rollback_hook
392
419
  #define sqlite3_set_authorizer sqlite3_api->set_authorizer
393
420
  #define sqlite3_set_auxdata sqlite3_api->set_auxdata
394
- #define sqlite3_snprintf sqlite3_api->snprintf
421
+ #define sqlite3_snprintf sqlite3_api->xsnprintf
395
422
  #define sqlite3_step sqlite3_api->step
396
423
  #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
397
424
  #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
@@ -415,7 +442,7 @@ struct sqlite3_api_routines {
415
442
  #define sqlite3_value_text16le sqlite3_api->value_text16le
416
443
  #define sqlite3_value_type sqlite3_api->value_type
417
444
  #define sqlite3_vmprintf sqlite3_api->vmprintf
418
- #define sqlite3_vsnprintf sqlite3_api->vsnprintf
445
+ #define sqlite3_vsnprintf sqlite3_api->xvsnprintf
419
446
  #define sqlite3_overload_function sqlite3_api->overload_function
420
447
  #define sqlite3_prepare_v2 sqlite3_api->prepare_v2
421
448
  #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
@@ -491,7 +518,7 @@ struct sqlite3_api_routines {
491
518
  #define sqlite3_uri_boolean sqlite3_api->uri_boolean
492
519
  #define sqlite3_uri_int64 sqlite3_api->uri_int64
493
520
  #define sqlite3_uri_parameter sqlite3_api->uri_parameter
494
- #define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
521
+ #define sqlite3_uri_vsnprintf sqlite3_api->xvsnprintf
495
522
  #define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
496
523
  /* Version 3.8.7 and later */
497
524
  #define sqlite3_auto_extension sqlite3_api->auto_extension
@@ -514,6 +541,23 @@ struct sqlite3_api_routines {
514
541
  /* Version 3.9.0 and later */
515
542
  #define sqlite3_value_subtype sqlite3_api->value_subtype
516
543
  #define sqlite3_result_subtype sqlite3_api->result_subtype
544
+ /* Version 3.10.0 and later */
545
+ #define sqlite3_status64 sqlite3_api->status64
546
+ #define sqlite3_strlike sqlite3_api->strlike
547
+ #define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
548
+ /* Version 3.12.0 and later */
549
+ #define sqlite3_system_errno sqlite3_api->system_errno
550
+ /* Version 3.14.0 and later */
551
+ #define sqlite3_trace_v2 sqlite3_api->trace_v2
552
+ #define sqlite3_expanded_sql sqlite3_api->expanded_sql
553
+ /* Version 3.18.0 and later */
554
+ #define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
555
+ /* Version 3.20.0 and later */
556
+ #define sqlite3_prepare_v3 sqlite3_api->prepare_v3
557
+ #define sqlite3_prepare16_v3 sqlite3_api->prepare16_v3
558
+ #define sqlite3_bind_pointer sqlite3_api->bind_pointer
559
+ #define sqlite3_result_pointer sqlite3_api->result_pointer
560
+ #define sqlite3_value_pointer sqlite3_api->value_pointer
517
561
  #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
518
562
 
519
563
  #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
@@ -531,4 +575,4 @@ struct sqlite3_api_routines {
531
575
  # define SQLITE_EXTENSION_INIT3 /*no-op*/
532
576
  #endif
533
577
 
534
- #endif /* _SQLITE3EXT_H_ */
578
+ #endif /* SQLITE3EXT_H */
@@ -65,7 +65,7 @@ module Amalgalite::TypeMaps
65
65
  case obj
66
66
  when Float
67
67
  ::Amalgalite::SQLite3::Constants::DataType::FLOAT
68
- when Fixnum
68
+ when Integer
69
69
  ::Amalgalite::SQLite3::Constants::DataType::INTEGER
70
70
  when NilClass
71
71
  ::Amalgalite::SQLite3::Constants::DataType::NULL
@@ -17,7 +17,7 @@ module Amalgalite::TypeMaps
17
17
  case obj
18
18
  when Float
19
19
  ::Amalgalite::SQLite3::Constants::DataType::FLOAT
20
- when Fixnum
20
+ when Integer
21
21
  ::Amalgalite::SQLite3::Constants::DataType::INTEGER
22
22
  when NilClass
23
23
  ::Amalgalite::SQLite3::Constants::DataType::NULL
@@ -4,5 +4,5 @@
4
4
  #++
5
5
 
6
6
  module Amalgalite
7
- VERSION = "1.5.0"
7
+ VERSION = "1.6.0"
8
8
  end
@@ -12,7 +12,7 @@ describe Amalgalite::TypeMaps::DefaultMap do
12
12
  @map.bind_type_of( 3.14 ).should == ::Amalgalite::SQLite3::Constants::DataType::FLOAT
13
13
  end
14
14
 
15
- it "Fixnum is bound to DataType::INTGER" do
15
+ it "Integer is bound to DataType::INTGER" do
16
16
  @map.bind_type_of( 42 ).should == ::Amalgalite::SQLite3::Constants::DataType::INTEGER
17
17
  end
18
18
 
@@ -25,7 +25,7 @@ describe "Integration specifications" do
25
25
  "datetime" => { :value => DateTime.now, :klass => DateTime },
26
26
  "timestamp" => { :value => Time.now, :klass => Time } ,
27
27
  "date" => { :value => Date.today, :klass => Date },
28
- "integer" => { :value => 42, :klass => Fixnum } ,
28
+ "integer" => { :value => 42, :klass => Integer },
29
29
  "double" => { :value => 3.14, :klass => Float },
30
30
  "varchar" => { :value => "foobarbaz", :klass => String },
31
31
  "boolean" => { :value => true, :klass => TrueClass },
@@ -36,7 +36,7 @@ describe "Integration specifications" do
36
36
  db.execute "CREATE TABLE t( c #{sql_type} )"
37
37
  db.execute "insert into t (c) values ( ? )", ruby_info[:value]
38
38
  rows = db.execute "select * from t"
39
- rows.first['c'].class.should eql(ruby_info[:klass])
39
+ rows.first['c'].should be_kind_of(ruby_info[:klass])
40
40
 
41
41
  if [ DateTime, Time ].include?( ruby_info[:klass] ) then
42
42
  rows.first['c'].strftime("%Y-%m-%d %H:%M:%S").should eql(ruby_info[:value].strftime("%Y-%m-%d %H:%M:%S"))
@@ -3,20 +3,26 @@ require 'amalgalite/sqlite3/version'
3
3
 
4
4
  describe "Amalgalite::SQLite3::Version" do
5
5
  it "should have the sqlite3 version" do
6
- expect(Amalgalite::SQLite3::VERSION).to match(/\d\.\d\.\d/)
7
- expect(Amalgalite::SQLite3::Version.to_s).to match( /\d\.\d\.\d/ )
8
- expect(Amalgalite::SQLite3::Version.runtime_version).to match( /\d\.\d\.\d/ )
6
+ expect(Amalgalite::SQLite3::VERSION).to match(/\d+\.\d+\.\d+/)
7
+ expect(Amalgalite::SQLite3::Version.to_s).to match( /\d+\.\d+\.\d+/ )
8
+ expect(Amalgalite::SQLite3::Version.runtime_version).to match( /\d+\.\d+\.\d+/ )
9
9
 
10
- Amalgalite::SQLite3::Version.to_i.should eql(3009002)
11
- Amalgalite::SQLite3::Version.runtime_version_number.should eql(3009002)
10
+ Amalgalite::SQLite3::Version.to_i.should eql(3021000)
11
+ Amalgalite::SQLite3::Version.runtime_version_number.should eql(3021000)
12
12
 
13
13
  Amalgalite::SQLite3::Version::MAJOR.should eql(3)
14
- Amalgalite::SQLite3::Version::MINOR.should eql(9)
15
- Amalgalite::SQLite3::Version::RELEASE.should eql(2)
14
+ Amalgalite::SQLite3::Version::MINOR.should eql(21)
15
+ Amalgalite::SQLite3::Version::RELEASE.should eql(0)
16
16
  expect(Amalgalite::SQLite3::Version.to_a.size).to eql(3)
17
17
 
18
- Amalgalite::SQLite3::Version.compiled_version.should be == "3.9.2"
19
- Amalgalite::SQLite3::Version.compiled_version_number.should be == 3009002
18
+ Amalgalite::SQLite3::Version.compiled_version.should be == "3.21.0"
19
+ Amalgalite::SQLite3::Version.compiled_version_number.should be == 3021000
20
20
  Amalgalite::SQLite3::Version.compiled_matches_runtime?.should be == true
21
21
  end
22
+
23
+ it "should have the sqlite3 source id" do
24
+ source_id = "2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827"
25
+ Amalgalite::SQLite3::Version.compiled_source_id.should be == source_id
26
+ Amalgalite::SQLite3::Version.runtime_source_id.should be == source_id
27
+ end
22
28
  end
@@ -12,7 +12,7 @@ describe Amalgalite::TypeMaps::StorageMap do
12
12
  @map.bind_type_of( 3.14 ).should == ::Amalgalite::SQLite3::Constants::DataType::FLOAT
13
13
  end
14
14
 
15
- it "Fixnum is bound to DataType::INTGER" do
15
+ it "Integer is bound to DataType::INTGER" do
16
16
  @map.bind_type_of( 42 ).should == ::Amalgalite::SQLite3::Constants::DataType::INTEGER
17
17
  end
18
18
 
@@ -24,25 +24,18 @@ namespace :develop do
24
24
  File.open( "Gemfile", "w+" ) do |f|
25
25
  f.puts "# DO NOT EDIT - This file is automatically generated"
26
26
  f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
27
- f.puts 'source "https://rubygems.org/"'
27
+ f.puts 'source "https://rubygems.org"'
28
28
  f.puts 'gemspec'
29
29
  end
30
30
  end
31
31
  end
32
- desc "Boostrap development"
32
+ desc "Bootstrap development"
33
33
  task :develop => "develop:default"
34
34
 
35
35
  #------------------------------------------------------------------------------
36
- # Minitest - standard TestTask
36
+ # RSpec - standard TestTask
37
37
  #------------------------------------------------------------------------------
38
38
  begin
39
- require 'rake/testtask'
40
- Rake::TestTask.new( :test ) do |t|
41
- t.ruby_opts = %w[ -w -rubygems ]
42
- t.libs = %w[ lib spec test ]
43
- t.pattern = "{test,spec}/**/{test_*,*_spec}.rb"
44
- end
45
-
46
39
  require 'rspec/core/rake_task'
47
40
  RSpec::Core::RakeTask.new( :test ) do |t|
48
41
  t.ruby_opts = %w[ -w ]
@@ -23,9 +23,9 @@ begin
23
23
  ext.lib_dir = File.join( 'lib', This.name )
24
24
  ext.gem_spec = This.ruby_gemspec
25
25
 
26
- ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
27
- ext.cross_platform = 'i386-mingw32' # forces the Windows platform instead of the default one
28
- # configure options only for cross compile
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
29
  end
30
30
  end
31
31
 
@@ -35,4 +35,4 @@ rescue LoadError
35
35
  end
36
36
 
37
37
  CLOBBER << FileList["lib/**/*.{jar,so,bundle}"]
38
- CLOBBER << FileList["lib/#{This.name}/{1.8,1.9,2.0,2.1,2.2}/"]
38
+ CLOBBER << FileList["lib/#{This.name}/{1,2}.*/"]
@@ -194,7 +194,9 @@ class ThisProject
194
194
  end
195
195
 
196
196
  def license
197
- "ISC"
197
+ license_file = project_path("LICENSE")
198
+ line = license_file.readlines.first
199
+ line.split(/\s+/).first
198
200
  end
199
201
 
200
202
  # Internal: The path to the gemspec file
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.5.0
4
+ version: 1.6.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2017-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arrayfields
@@ -44,70 +44,70 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '12.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '12.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake-compiler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.9'
61
+ version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.9'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake-compiler-dock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.4'
75
+ version: '0.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.4'
82
+ version: '0.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rdoc
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '4.0'
89
+ version: '5.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '4.0'
96
+ version: '5.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.9'
103
+ version: '0.14'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.9'
110
+ version: '0.14'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: zip
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -175,11 +175,11 @@ files:
175
175
  - ext/amalgalite/c/sqlite3_options.h
176
176
  - ext/amalgalite/c/sqlite3ext.h
177
177
  - lib/amalgalite.rb
178
- - lib/amalgalite/1.8/amalgalite.so
179
- - lib/amalgalite/1.9/amalgalite.so
180
178
  - lib/amalgalite/2.0/amalgalite.so
181
179
  - lib/amalgalite/2.1/amalgalite.so
182
180
  - lib/amalgalite/2.2/amalgalite.so
181
+ - lib/amalgalite/2.3/amalgalite.so
182
+ - lib/amalgalite/2.4/amalgalite.so
183
183
  - lib/amalgalite/aggregate.rb
184
184
  - lib/amalgalite/blob.rb
185
185
  - lib/amalgalite/boolean.rb
@@ -267,7 +267,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
267
267
  requirements:
268
268
  - - ">="
269
269
  - !ruby/object:Gem::Version
270
- version: 1.9.3
270
+ version: '2.0'
271
+ - - "<"
272
+ - !ruby/object:Gem::Version
273
+ version: '2.5'
271
274
  required_rubygems_version: !ruby/object:Gem::Requirement
272
275
  requirements:
273
276
  - - ">="
@@ -275,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
278
  version: '0'
276
279
  requirements: []
277
280
  rubyforge_project:
278
- rubygems_version: 2.4.8
281
+ rubygems_version: 2.6.12
279
282
  signing_key:
280
283
  specification_version: 4
281
284
  summary: Amalgalite embeds the SQLite database engine in a ruby extension. There