sqlite3-ruby 0.6.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sqlite3-ruby might be problematic. Click here for more details.

@@ -31,5 +31,6 @@
31
31
  # =============================================================================
32
32
  #++
33
33
 
34
+
34
35
  Dir.chdir File.dirname( __FILE__ )
35
36
  Dir["**/tc_*.rb"].each { |file| load file }
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.3
2
+ rubygems_version: 0.8.4
3
3
  specification_version: 1
4
4
  name: sqlite3-ruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.0
7
- date: 2004-12-29
6
+ version: 0.9.0
7
+ date: 2005-01-05
8
8
  summary: SQLite3/Ruby is a module to allow Ruby scripts to interface with a SQLite3 database.
9
9
  require_paths:
10
10
  - lib
@@ -31,6 +31,12 @@ files:
31
31
  - doc/faq/faq.html
32
32
  - doc/faq/faq.yml
33
33
  - doc/faq/faq.rb
34
+ - ext/sqlite3_api
35
+ - ext/sqlite3_api/post-clean.rb
36
+ - ext/sqlite3_api/extconf.rb
37
+ - ext/sqlite3_api/sqlite3_api.i
38
+ - ext/sqlite3_api/post-distclean.rb
39
+ - ext/sqlite3_api/MANIFEST
34
40
  - lib/sqlite3.rb
35
41
  - lib/sqlite3
36
42
  - lib/sqlite3/statement.rb
@@ -44,13 +50,16 @@ files:
44
50
  - lib/sqlite3/pragmas.rb
45
51
  - lib/sqlite3/errors.rb
46
52
  - lib/sqlite3/driver/dl
53
+ - lib/sqlite3/driver/native
47
54
  - lib/sqlite3/driver/dl/driver.rb
48
55
  - lib/sqlite3/driver/dl/api.rb
49
- - lib/sqlite3/driver/dl/api.rb~
56
+ - lib/sqlite3/driver/native/driver.rb
50
57
  - test/bm.rb
51
58
  - test/mocks.rb
52
59
  - test/tests.rb
60
+ - test/tc_integration.rb
53
61
  - test/driver
62
+ - test/native-vs-dl.rb
54
63
  - test/tc_database.rb
55
64
  - test/driver/dl
56
65
  - test/driver/dl/tc_driver.rb
@@ -63,6 +72,7 @@ rdoc_options:
63
72
  extra_rdoc_files:
64
73
  - README
65
74
  executables: []
66
- extensions: []
75
+ extensions:
76
+ - ext/sqlite3_api/extconf.rb
67
77
  requirements: []
68
78
  dependencies: []
@@ -1,182 +0,0 @@
1
- #--
2
- # =============================================================================
3
- # Copyright (c) 2004, Jamis Buck (jgb3@email.byu.edu)
4
- # All rights reserved.
5
- #
6
- # Redistribution and use in source and binary forms, with or without
7
- # modification, are permitted provided that the following conditions are met:
8
- #
9
- # * Redistributions of source code must retain the above copyright notice,
10
- # this list of conditions and the following disclaimer.
11
- #
12
- # * Redistributions in binary form must reproduce the above copyright
13
- # notice, this list of conditions and the following disclaimer in the
14
- # documentation and/or other materials provided with the distribution.
15
- #
16
- # * The names of its contributors may not be used to endorse or promote
17
- # products derived from this software without specific prior written
18
- # permission.
19
- #
20
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
24
- # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- # =============================================================================
31
- #++
32
-
33
- require 'dl/import'
34
-
35
- module SQLite3 ; module Driver; module DL;
36
-
37
- module API
38
- extend ::DL::Importable
39
-
40
- library_name = case RUBY_PLATFORM.downcase
41
- when /linux/
42
- "libsqlite3.so"
43
- when /win32/
44
- "sqlite3.dll"
45
- else
46
- abort <<-EOF
47
- == * UNSUPPORTED PLATFORM ======================================================
48
- The platform '#{RUBY_PLATFORM}' is unsupported. Please help the author by
49
- editing the following file to allow your sqlite3 library to be found, and
50
- submitting a patch to jamis_buck@byu.edu. Thanks!
51
-
52
- #{' '*((74-__FILE__.length)/2)}-> #{__FILE__} <-
53
- =========================================================================== * ==
54
- EOF
55
- end
56
-
57
- if defined? SQLITE3_LIB_PATH
58
- library_name = File.join( SQLITE3_LIB_PATH, library_name )
59
- end
60
-
61
- dlload library_name
62
-
63
- typealias "db", "void*"
64
- typealias "stmt", "void*"
65
- typealias "value", "void*"
66
- typealias "context", "void*"
67
-
68
- # until Ruby/DL supports 64-bit ints, we'll just treat them as 32-bit ints
69
- typealias "int64", "unsigned long"
70
-
71
- extern "const char *sqlite3_libversion()"
72
-
73
- extern "int sqlite3_open(const char*,db*)"
74
- extern "int sqlite3_open16(const void*,db*)"
75
- extern "int sqlite3_close(db)"
76
- extern "const char* sqlite3_errmsg(db)"
77
- extern "void* sqlite3_errmsg16(db)"
78
- extern "int sqlite3_errcode(db)"
79
-
80
- extern "int sqlite3_prepare(db,const char*,int,stmt*,const char**)"
81
- extern "int sqlite3_prepare16(db,const void*,int,stmt*,const void**)"
82
- extern "int sqlite3_finalize(stmt)"
83
- extern "int sqlite3_reset(stmt)"
84
- extern "int sqlite3_step(stmt)"
85
-
86
- extern "int64 sqlite3_last_insert_rowid(db)"
87
- extern "int sqlite3_changes(db)"
88
- extern "int sqlite3_total_changes(db)"
89
- extern "void sqlite3_interrupt(db)"
90
- extern "ibool sqlite3_complete(const char*)"
91
- extern "ibool sqlite3_complete16(const void*)"
92
-
93
- extern "int sqlite3_busy_handler(db,void*,void*)"
94
- extern "int sqlite3_busy_timeout(db,int)"
95
-
96
- extern "int sqlite3_set_authorizer(db,void*,void*)"
97
- extern "void* sqlite3_trace(db,void*,void*)"
98
-
99
- extern "int sqlite3_bind_blob(stmt,int,const void*,int,void*)"
100
- extern "int sqlite3_bind_double(stmt,int,double)"
101
- extern "int sqlite3_bind_int(stmt,int,int)"
102
- extern "int sqlite3_bind_int64(stmt,int,int64)"
103
- extern "int sqlite3_bind_null(stmt,int)"
104
- extern "int sqlite3_bind_text(stmt,int,const char*,int,void*)"
105
- extern "int sqlite3_bind_text16(stmt,int,const void*,int,void*)"
106
- #extern "int sqlite3_bind_value(stmt,int,value)"
107
-
108
- extern "int sqlite3_bind_parameter_count(stmt)"
109
- extern "const char* sqlite3_bind_parameter_name(stmt,int)"
110
- extern "int sqlite3_bind_parameter_index(stmt,const char*)"
111
-
112
- extern "int sqlite3_column_count(stmt)"
113
- extern "int sqlite3_data_count(stmt)"
114
-
115
- extern "const void *sqlite3_column_blob(stmt,int)"
116
- extern "int sqlite3_column_bytes(stmt,int)"
117
- extern "int sqlite3_column_bytes16(stmt,int)"
118
- extern "const char *sqlite3_column_decltype(stmt,int)"
119
- extern "void *sqlite3_column_decltype16(stmt,int)"
120
- extern "double sqlite3_column_double(stmt,int)"
121
- extern "int sqlite3_column_int(stmt,int)"
122
- extern "int64 sqlite3_column_int64(stmt,int)"
123
- extern "const char *sqlite3_column_name(stmt,int)"
124
- extern "const void *sqlite3_column_name16(stmt,int)"
125
- extern "const char *sqlite3_column_text(stmt,int)"
126
- extern "const void *sqlite3_column_text16(stmt,int)"
127
- extern "int sqlite3_column_type(stmt,int)"
128
-
129
- extern "int sqlite3_create_function(db,const char*,int,int,void*,void*,void*,void*)"
130
- extern "int sqlite3_create_function16(db,const void*,int,int,void*,void*,void*,void*)"
131
- extern "int sqlite3_aggregate_count(context)"
132
-
133
- extern "const void *sqlite3_value_blob(value)"
134
- extern "int sqlite3_value_bytes(value)"
135
- extern "int sqlite3_value_bytes16(value)"
136
- extern "double sqlite3_value_double(value)"
137
- extern "int sqlite3_value_int(value)"
138
- extern "int64 sqlite3_value_int64(value)"
139
- extern "const char* sqlite3_value_text(value)"
140
- extern "const void* sqlite3_value_text16(value)"
141
- extern "const void* sqlite3_value_text16le(value)"
142
- extern "const void* sqlite3_value_text16be(value)"
143
- extern "int sqlite3_value_type(value)"
144
-
145
- extern "void *sqlite3_aggregate_context(context,int)"
146
- extern "void *sqlite3_user_data(context)"
147
- extern "void *sqlite3_get_auxdata(context,int)"
148
- extern "void sqlite3_set_auxdata(context,int,void*,void*)"
149
-
150
- extern "void sqlite3_result_blob(context,const void*,int,void*)"
151
- extern "void sqlite3_result_double(context,double)"
152
- extern "void sqlite3_result_error(context,const char*,int)"
153
- extern "void sqlite3_result_error16(context,const void*,int)"
154
- extern "void sqlite3_result_int(context,int)"
155
- extern "void sqlite3_result_int64(context,int64)"
156
- extern "void sqlite3_result_null(context)"
157
- extern "void sqlite3_result_text(context,const char*,int,void*)"
158
- extern "void sqlite3_result_text16(context,const void*,int,void*)"
159
- extern "void sqlite3_result_text16le(context,const void*,int,void*)"
160
- extern "void sqlite3_result_text16be(context,const void*,int,void*)"
161
- extern "void sqlite3_result_value(context,value)"
162
-
163
- extern "int sqlite3_create_collation(db,const char*,int,void*,void*)"
164
- extern "int sqlite3_create_collation16(db,const char*,int,void*,void*)"
165
- extern "int sqlite3_collation_needed(db,void*,void*)"
166
- extern "int sqlite3_collation_needed16(db,void*,void*)"
167
-
168
- # ==== CRYPTO (NOT IN PUBLIC RELEASE) ====
169
- if defined?( CRYPTO_API ) && CRYPTO_API
170
- extern "int sqlite3_key(db,void*,int)"
171
- extern "int sqlite3_rekey(db,void*,int)"
172
- end
173
-
174
- # ==== EXPERIMENTAL ====
175
- if defined?( EXPERIMENTAL_API ) && EXPERIMENTAL_API
176
- extern "int sqlite3_progress_handler(db,int,void*,void*)"
177
- extern "int sqlite3_commit_hook(db,void*,void*)"
178
- end
179
-
180
- end
181
-
182
- end ; end ; end