amalgalite 1.6.0-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +49 -0
  3. data/HISTORY.md +346 -0
  4. data/LICENSE +31 -0
  5. data/Manifest.txt +104 -0
  6. data/README.md +65 -0
  7. data/Rakefile +26 -0
  8. data/TODO.md +57 -0
  9. data/bin/amalgalite-pack +147 -0
  10. data/examples/a.rb +9 -0
  11. data/examples/blob.rb +88 -0
  12. data/examples/bootstrap.rb +36 -0
  13. data/examples/define_aggregate.rb +75 -0
  14. data/examples/define_function.rb +104 -0
  15. data/examples/fts5.rb +152 -0
  16. data/examples/gem-db.rb +94 -0
  17. data/examples/require_me.rb +11 -0
  18. data/examples/requires.rb +42 -0
  19. data/examples/schema-info.rb +34 -0
  20. data/ext/amalgalite/c/amalgalite.c +355 -0
  21. data/ext/amalgalite/c/amalgalite.h +151 -0
  22. data/ext/amalgalite/c/amalgalite_blob.c +240 -0
  23. data/ext/amalgalite/c/amalgalite_constants.c +1226 -0
  24. data/ext/amalgalite/c/amalgalite_database.c +1178 -0
  25. data/ext/amalgalite/c/amalgalite_requires_bootstrap.c +282 -0
  26. data/ext/amalgalite/c/amalgalite_statement.c +649 -0
  27. data/ext/amalgalite/c/extconf.rb +62 -0
  28. data/ext/amalgalite/c/gen_constants.rb +330 -0
  29. data/ext/amalgalite/c/notes.txt +134 -0
  30. data/ext/amalgalite/c/sqlite3.c +205352 -0
  31. data/ext/amalgalite/c/sqlite3.h +10727 -0
  32. data/ext/amalgalite/c/sqlite3_options.h +4 -0
  33. data/ext/amalgalite/c/sqlite3ext.h +578 -0
  34. data/lib/amalgalite.rb +51 -0
  35. data/lib/amalgalite/2.0/amalgalite.so +0 -0
  36. data/lib/amalgalite/2.1/amalgalite.so +0 -0
  37. data/lib/amalgalite/2.2/amalgalite.so +0 -0
  38. data/lib/amalgalite/2.3/amalgalite.so +0 -0
  39. data/lib/amalgalite/2.4/amalgalite.so +0 -0
  40. data/lib/amalgalite/aggregate.rb +67 -0
  41. data/lib/amalgalite/blob.rb +186 -0
  42. data/lib/amalgalite/boolean.rb +42 -0
  43. data/lib/amalgalite/busy_timeout.rb +47 -0
  44. data/lib/amalgalite/column.rb +99 -0
  45. data/lib/amalgalite/core_ext/kernel/require.rb +21 -0
  46. data/lib/amalgalite/csv_table_importer.rb +74 -0
  47. data/lib/amalgalite/database.rb +984 -0
  48. data/lib/amalgalite/function.rb +61 -0
  49. data/lib/amalgalite/index.rb +43 -0
  50. data/lib/amalgalite/memory_database.rb +15 -0
  51. data/lib/amalgalite/packer.rb +231 -0
  52. data/lib/amalgalite/paths.rb +80 -0
  53. data/lib/amalgalite/profile_tap.rb +131 -0
  54. data/lib/amalgalite/progress_handler.rb +21 -0
  55. data/lib/amalgalite/requires.rb +151 -0
  56. data/lib/amalgalite/schema.rb +225 -0
  57. data/lib/amalgalite/sqlite3.rb +6 -0
  58. data/lib/amalgalite/sqlite3/constants.rb +95 -0
  59. data/lib/amalgalite/sqlite3/database/function.rb +48 -0
  60. data/lib/amalgalite/sqlite3/database/status.rb +68 -0
  61. data/lib/amalgalite/sqlite3/status.rb +60 -0
  62. data/lib/amalgalite/sqlite3/version.rb +55 -0
  63. data/lib/amalgalite/statement.rb +418 -0
  64. data/lib/amalgalite/table.rb +91 -0
  65. data/lib/amalgalite/taps.rb +2 -0
  66. data/lib/amalgalite/taps/console.rb +27 -0
  67. data/lib/amalgalite/taps/io.rb +71 -0
  68. data/lib/amalgalite/trace_tap.rb +35 -0
  69. data/lib/amalgalite/type_map.rb +63 -0
  70. data/lib/amalgalite/type_maps/default_map.rb +166 -0
  71. data/lib/amalgalite/type_maps/storage_map.rb +38 -0
  72. data/lib/amalgalite/type_maps/text_map.rb +21 -0
  73. data/lib/amalgalite/version.rb +8 -0
  74. data/lib/amalgalite/view.rb +26 -0
  75. data/spec/aggregate_spec.rb +154 -0
  76. data/spec/amalgalite_spec.rb +4 -0
  77. data/spec/blob_spec.rb +78 -0
  78. data/spec/boolean_spec.rb +24 -0
  79. data/spec/busy_handler.rb +157 -0
  80. data/spec/data/iso-3166-country.txt +242 -0
  81. data/spec/data/iso-3166-schema.sql +22 -0
  82. data/spec/data/iso-3166-subcountry.txt +3995 -0
  83. data/spec/data/make-iso-db.sh +12 -0
  84. data/spec/database_spec.rb +508 -0
  85. data/spec/default_map_spec.rb +92 -0
  86. data/spec/function_spec.rb +78 -0
  87. data/spec/integeration_spec.rb +97 -0
  88. data/spec/iso_3166_database.rb +58 -0
  89. data/spec/packer_spec.rb +60 -0
  90. data/spec/paths_spec.rb +28 -0
  91. data/spec/progress_handler_spec.rb +91 -0
  92. data/spec/requires_spec.rb +54 -0
  93. data/spec/rtree_spec.rb +66 -0
  94. data/spec/schema_spec.rb +131 -0
  95. data/spec/spec_helper.rb +48 -0
  96. data/spec/sqlite3/constants_spec.rb +108 -0
  97. data/spec/sqlite3/database_status_spec.rb +36 -0
  98. data/spec/sqlite3/status_spec.rb +22 -0
  99. data/spec/sqlite3/version_spec.rb +28 -0
  100. data/spec/sqlite3_spec.rb +53 -0
  101. data/spec/statement_spec.rb +168 -0
  102. data/spec/storage_map_spec.rb +38 -0
  103. data/spec/tap_spec.rb +57 -0
  104. data/spec/text_map_spec.rb +20 -0
  105. data/spec/type_map_spec.rb +14 -0
  106. data/spec/version_spec.rb +8 -0
  107. data/tasks/custom.rake +102 -0
  108. data/tasks/default.rake +240 -0
  109. data/tasks/extension.rake +38 -0
  110. data/tasks/this.rb +208 -0
  111. metadata +318 -0
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Copyright (c) 2008 Jeremy Hinegardner
3
+ * All rights reserved. See LICENSE and/or COPYING for details.
4
+ *
5
+ * vim: shiftwidth=4
6
+ */
7
+
8
+ #ifndef __AMALGALITE_H__
9
+ #define __AMALGALITE_H__
10
+
11
+ #include "ruby.h"
12
+ #include "sqlite3.h"
13
+ #include <string.h>
14
+
15
+ /* wrapper struct around the sqlite3 opaque pointer */
16
+ typedef struct am_sqlite3 {
17
+ sqlite3 *db;
18
+ VALUE trace_obj;
19
+ VALUE profile_obj;
20
+ VALUE busy_handler_obj;
21
+ VALUE progress_handler_obj;
22
+ } am_sqlite3;
23
+
24
+ /* wrapper struct around the sqlite3_statement opaque pointer */
25
+ typedef struct am_sqlite3_stmt {
26
+ sqlite3_stmt *stmt;
27
+ VALUE remaining_sql;
28
+ } am_sqlite3_stmt;
29
+
30
+ /* wrapper struct around the sqlite3_blob opaque ponter */
31
+ typedef struct am_sqlite3_blob {
32
+ sqlite3_blob *blob;
33
+ sqlite3 *db;
34
+ int length;
35
+ int current_offset;
36
+ } am_sqlite3_blob;
37
+
38
+ /* wrapper struct around the information needed to call rb_apply
39
+ * used to encapsulate data into a call for amalgalite_wrap_apply
40
+ */
41
+ typedef struct am_protected {
42
+ VALUE instance;
43
+ ID method;
44
+ int argc;
45
+ VALUE *argv;
46
+ } am_protected_t;
47
+
48
+ /** module and classes **/
49
+ extern VALUE mA; /* module Amalgalite */
50
+ extern VALUE mAS; /* module Amalgalite::SQLite3 */
51
+ extern VALUE mASV; /* module Amalgalite::SQLite3::Version */
52
+ extern VALUE eAS_Error; /* class Amalgalite::SQLite3::Error */
53
+ extern VALUE cAR; /* class Amalgalite::Requries */
54
+ extern VALUE cARB; /* class Amalgalite::Requries::Bootstrap */
55
+
56
+ /*----------------------------------------------------------------------
57
+ * Prototype for Amalgalite::SQLite3::Database
58
+ *---------------------------------------------------------------------*/
59
+ extern VALUE cAS_Database; /* class Amalgalite::SQLite3::Database */
60
+
61
+ extern void am_define_constants_under(VALUE);
62
+ extern VALUE am_sqlite3_database_alloc(VALUE klass);
63
+ extern void am_sqlite3_database_free(am_sqlite3*);
64
+ extern VALUE am_sqlite3_database_open(int argc, VALUE* argv, VALUE self);
65
+ extern VALUE am_sqlite3_database_close(VALUE self);
66
+ extern VALUE am_sqlite3_database_open16(VALUE self, VALUE rFilename);
67
+ extern VALUE am_sqlite3_database_last_insert_rowid(VALUE self);
68
+ extern VALUE am_sqlite3_database_is_autocommit(VALUE self);
69
+ extern VALUE am_sqlite3_database_row_changes(VALUE self);
70
+ extern VALUE am_sqlite3_database_total_changes(VALUE self);
71
+ extern VALUE am_sqlite3_database_table_column_metadata(VALUE self, VALUE db_name, VALUE tbl_name, VALUE col_name);
72
+
73
+ extern VALUE am_sqlite3_database_prepare(VALUE self, VALUE rSQL);
74
+ extern VALUE am_sqlite3_database_register_trace_tap(VALUE self, VALUE tap);
75
+ extern VALUE am_sqlite3_database_register_profile_tap(VALUE self, VALUE tap);
76
+ extern VALUE am_sqlite3_database_busy_handler(VALUE self, VALUE handler);
77
+
78
+ /*----------------------------------------------------------------------
79
+ * Prototype for Amalgalite::SQLite3::Statement
80
+ *---------------------------------------------------------------------*/
81
+ extern VALUE cAS_Statement; /* class Amalgalite::SQLite3::Statement */
82
+
83
+ extern VALUE am_sqlite3_statement_alloc(VALUE klass);
84
+ extern void am_sqlite3_statement_free(am_sqlite3_stmt* );
85
+ extern VALUE am_sqlite3_statement_sql(VALUE self);
86
+ extern VALUE am_sqlite3_statement_close(VALUE self);
87
+ extern VALUE am_sqlite3_statement_step(VALUE self);
88
+ extern VALUE am_sqlite3_statement_column_count(VALUE self);
89
+ extern VALUE am_sqlite3_statement_column_name(VALUE self, VALUE index);
90
+ extern VALUE am_sqlite3_statement_column_decltype(VALUE self, VALUE index);
91
+ extern VALUE am_sqlite3_statement_column_type(VALUE self, VALUE index);
92
+ extern VALUE am_sqlite3_statement_column_blob(VALUE self, VALUE index);
93
+ extern VALUE am_sqlite3_statement_column_text(VALUE self, VALUE index);
94
+ extern VALUE am_sqlite3_statement_column_int(VALUE self, VALUE index);
95
+ extern VALUE am_sqlite3_statement_column_int64(VALUE self, VALUE index);
96
+ extern VALUE am_sqlite3_statement_column_double(VALUE self, VALUE index);
97
+
98
+ extern VALUE am_sqlite3_statement_column_database_name(VALUE self, VALUE position);
99
+ extern VALUE am_sqlite3_statement_column_table_name(VALUE self, VALUE position);
100
+ extern VALUE am_sqlite3_statement_column_origin_name(VALUE self, VALUE position);
101
+
102
+ extern VALUE am_sqlite3_statement_reset(VALUE self);
103
+ extern VALUE am_sqlite3_statement_clear_bindings(VALUE self);
104
+ extern VALUE am_sqlite3_statement_bind_parameter_count(VALUE self);
105
+ extern VALUE am_sqlite3_statement_bind_parameter_index(VALUE self, VALUE parameter_name);
106
+ extern VALUE am_sqlite3_statement_remaining_sql(VALUE self);
107
+ extern VALUE am_sqlite3_statement_bind_text(VALUE self, VALUE position, VALUE value);
108
+ extern VALUE am_sqlite3_statement_bind_blob(VALUE self, VALUE position, VALUE value);
109
+ extern VALUE am_sqlite3_statement_bind_zeroblob(VALUE self, VALUE position, VALUE value);
110
+ extern VALUE am_sqlite3_statement_bind_int(VALUE self, VALUE position, VALUE value);
111
+ extern VALUE am_sqlite3_statement_bind_int64(VALUE self, VALUE position, VALUE value);
112
+ extern VALUE am_sqlite3_statement_bind_double(VALUE self, VALUE position, VALUE value);
113
+ extern VALUE am_sqlite3_statement_bind_null(VALUE self, VALUE position);
114
+
115
+ /*----------------------------------------------------------------------
116
+ * Prototype for Amalgalite::SQLite3::Blob
117
+ *---------------------------------------------------------------------*/
118
+ extern VALUE cAS_Blob; /* class Amalgalite::SQLite3::Blob */
119
+
120
+ extern VALUE am_sqlite3_blob_alloc(VALUE klass);
121
+ extern VALUE am_sqlite3_blob_initialize( VALUE self, VALUE db, VALUE db_name, VALUE table_name, VALUE column_name, VALUE rowid, VALUE flag) ;
122
+ extern void am_sqlite3_blob_free(am_sqlite3_blob* );
123
+ extern VALUE am_sqlite3_blob_read(VALUE self, VALUE length);
124
+ extern VALUE am_sqlite3_blob_write(VALUE self, VALUE buffer);
125
+ extern VALUE am_sqlite3_blob_close(VALUE self);
126
+ extern VALUE am_sqlite3_blob_length(VALUE self);
127
+
128
+ /*----------------------------------------------------------------------
129
+ * more initialization methods
130
+ *----------------------------------------------------------------------*/
131
+ extern void Init_amalgalite_constants( );
132
+ extern void Init_amalgalite_database( );
133
+ extern void Init_amalgalite_statement( );
134
+ extern void Init_amalgalite_blob( );
135
+ extern void Init_amalgalite_requires_bootstrap( );
136
+
137
+
138
+ /***********************************************************************
139
+ * Type conversion macros between sqlite data types and ruby types
140
+ **********************************************************************/
141
+
142
+ #define SQLINT64_2NUM(x) ( LL2NUM( x ) )
143
+ #define SQLUINT64_2NUM(x) ( ULL2NUM( x ) )
144
+ #define NUM2SQLINT64( obj ) ( NUM2LL( obj ) )
145
+ #define NUM2SQLUINT64( obj ) ( NUM2ULL( obj ) )
146
+
147
+ /***********************************************************************
148
+ * return the last exception in ruby's error message
149
+ */
150
+ #define ERROR_INFO_MESSAGE() ( rb_obj_as_string( rb_gv_get("$!") ) )
151
+ #endif
@@ -0,0 +1,240 @@
1
+ #include "amalgalite.h"
2
+ /**
3
+ * Copyright (c) 2008 Jeremy Hinegardner
4
+ * All rights reserved. See LICENSE and/or COPYING for details.
5
+ *
6
+ * vim: shiftwidth=4
7
+ */
8
+
9
+ /* class Amalgliate::SQLite3::Blob */
10
+ VALUE cAS_Blob;
11
+
12
+ /**
13
+ * call-seq:
14
+ * Blob.new( database, table_name, column_name, row_id, flag ) -> Blob
15
+ *
16
+ * Create a new Blob object and associate it with the approriate, database,
17
+ * table, column and row. +flag+ indicates if the Blob is to be opened for
18
+ * writing "w" or reading "r".
19
+ *
20
+ */
21
+ VALUE am_sqlite3_blob_initialize( VALUE self, VALUE db, VALUE db_name, VALUE table_name, VALUE column_name, VALUE rowid, VALUE flag)
22
+ {
23
+ am_sqlite3_blob *am_blob;
24
+ int rc;
25
+ am_sqlite3 *am_db;
26
+ char *zDb = StringValuePtr( db_name );
27
+ char *zTable = StringValuePtr( table_name );
28
+ char *zColumn = StringValuePtr( column_name );
29
+ sqlite3_int64 iRow = NUM2SQLINT64( rowid ) ;
30
+ VALUE flag_str = StringValue( flag );
31
+ int flags = 0;
32
+
33
+ /* extract the blob struct */
34
+ Data_Get_Struct(self, am_sqlite3_blob, am_blob);
35
+
36
+ /* extract the sqlite3 db struct */
37
+ Data_Get_Struct(db, am_sqlite3, am_db);
38
+
39
+ /* make sure that the flags are valid, only 'r' or 'w' are allowed */
40
+ if ( ( RSTRING_LEN( flag_str ) != 1) ||
41
+ ( ( 'r' != RSTRING_PTR( flag_str )[0] ) &&
42
+ ( 'w' != RSTRING_PTR( flag_str )[0] ))) {
43
+ rb_raise( eAS_Error, "Error opening Blob in db = %s, table = %s, column = %s, rowid = %lu. Invalid flag '%s'. Must be either 'w' or 'r'\n",
44
+ zDb, zTable, zColumn, (unsigned long)iRow, RSTRING_PTR( flag_str ));
45
+ }
46
+
47
+ /* switch to write mode */
48
+ if ( 'w' == RSTRING_PTR( flag_str )[0] ) {
49
+ flags = 1;
50
+ }
51
+
52
+ /* open the blob and associate the db to it */
53
+ rc = sqlite3_blob_open( am_db->db, zDb, zTable, zColumn, iRow, flags, &( am_blob->blob ) );
54
+ if ( SQLITE_OK != rc ) {
55
+ rb_raise( eAS_Error, "Error opening Blob in db = %s, table = %s, column = %s, rowid = %lu : [SQLITE_ERROR %d] %s\n", zDb, zTable, zColumn, (unsigned long)iRow, rc, sqlite3_errmsg( am_db->db) );
56
+ }
57
+ am_blob->length = sqlite3_blob_bytes( am_blob->blob );
58
+ am_blob->db = am_db->db;
59
+
60
+ /* if a block is given then yield self and close the blob when done */
61
+ if ( rb_block_given_p() ) {
62
+ rb_yield( self );
63
+ am_sqlite3_blob_close( self );
64
+ return Qnil;
65
+ } else {
66
+ return self;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * call-seq:
72
+ * blob.close -> nil
73
+ *
74
+ * Closes the blob.
75
+ */
76
+ VALUE am_sqlite3_blob_close( VALUE self )
77
+ {
78
+ am_sqlite3_blob *am_blob;
79
+ int rc;
80
+
81
+ Data_Get_Struct(self, am_sqlite3_blob, am_blob);
82
+ rc = sqlite3_blob_close( am_blob->blob );
83
+ if ( SQLITE_OK != rc ) {
84
+ rb_raise(eAS_Error, "Error closing blob: [SQLITE_ERROR %d] %s\n",
85
+ rc, sqlite3_errmsg( am_blob->db ));
86
+ }
87
+
88
+
89
+ return Qnil;
90
+ }
91
+
92
+
93
+ /**
94
+ * call-seq:
95
+ * blob.length -> length in bytes of the blob
96
+ *
97
+ * Returns the number of bytes in the blob.
98
+ */
99
+ VALUE am_sqlite3_blob_length( VALUE self )
100
+ {
101
+ am_sqlite3_blob *am_blob;
102
+
103
+ Data_Get_Struct(self, am_sqlite3_blob, am_blob);
104
+
105
+ return INT2FIX( am_blob->length );
106
+ }
107
+
108
+ /**
109
+ * call-seq:
110
+ * blob.read( int ) -> String containting int number of bytes or nil if eof.
111
+ *
112
+ * returns int number of bytes as a String from the database
113
+ */
114
+ VALUE am_sqlite3_blob_read( VALUE self, VALUE length )
115
+ {
116
+ am_sqlite3_blob *am_blob;
117
+ int rc;
118
+ int n = NUM2INT( length );
119
+ void *buf = NULL;
120
+ VALUE result;
121
+
122
+ Data_Get_Struct(self, am_sqlite3_blob, am_blob);
123
+
124
+ /* we have to be exact on the number of bytes to read. n + current_offset
125
+ * cannot be larger than the blob's length
126
+ */
127
+ if ( (n + am_blob->current_offset > am_blob->length)) {
128
+ n = am_blob->length - am_blob->current_offset;
129
+ }
130
+
131
+ if ( am_blob->current_offset == am_blob->length ) {
132
+ return Qnil;
133
+ }
134
+
135
+ buf = (void *)malloc( n );
136
+ rc = sqlite3_blob_read( am_blob->blob, buf, n, am_blob->current_offset);
137
+
138
+ if ( rc != SQLITE_OK ) {
139
+ rb_raise(eAS_Error, "Error reading %d bytes blob at offset %d: [SQLITE_ERROR %d] %s\n",
140
+ n, am_blob->current_offset, rc, sqlite3_errmsg( am_blob->db ));
141
+ }
142
+
143
+ am_blob->current_offset += n;
144
+
145
+ result = rb_str_new( (char*)buf, n );
146
+ free( buf );
147
+ return result;
148
+
149
+ }
150
+
151
+ /**
152
+ * call-seq:
153
+ * blob.write( buf ) -> int
154
+ *
155
+ * writes the contents of the string buffer to the blob and returns the number
156
+ * of bytes written.
157
+ *
158
+ */
159
+ VALUE am_sqlite3_blob_write( VALUE self, VALUE buf )
160
+ {
161
+ am_sqlite3_blob *am_blob;
162
+ int rc;
163
+ VALUE str = StringValue( buf );
164
+ int n = (int)RSTRING_LEN( str );
165
+ char *chk_buf = NULL;
166
+
167
+ Data_Get_Struct(self, am_sqlite3_blob, am_blob);
168
+
169
+ rc = sqlite3_blob_write( am_blob->blob, RSTRING_PTR(str), n, am_blob->current_offset);
170
+
171
+ if ( rc != SQLITE_OK ) {
172
+ rb_raise(eAS_Error, "Error writing %d bytes blob at offset %d: [SQLITE_ERROR %d] %s\n",
173
+ n, am_blob->current_offset, rc, sqlite3_errmsg( am_blob->db ));
174
+ }
175
+
176
+ chk_buf = (char *) malloc( n + 1);
177
+ chk_buf[n] = '\0';
178
+ sqlite3_blob_read( am_blob->blob, chk_buf, n, 0);
179
+
180
+ am_blob->current_offset += n;
181
+
182
+ return INT2FIX( n );
183
+
184
+ }
185
+
186
+
187
+ /***********************************************************************
188
+ * Ruby life cycle methods
189
+ ***********************************************************************/
190
+
191
+ /*
192
+ * garbage collector free method for the am_sqlite3_blob structure
193
+ */
194
+ void am_sqlite3_blob_free(am_sqlite3_blob* wrapper)
195
+ {
196
+ free(wrapper);
197
+ return;
198
+ }
199
+
200
+ /*
201
+ * allocate the am_blob structure
202
+ */
203
+ VALUE am_sqlite3_blob_alloc(VALUE klass)
204
+ {
205
+ am_sqlite3_blob *wrapper = ALLOC( am_sqlite3_blob );
206
+ VALUE obj ;
207
+
208
+ wrapper->current_offset = 0;
209
+ wrapper->db = NULL;
210
+ obj = Data_Wrap_Struct(klass, NULL, am_sqlite3_blob_free, wrapper);
211
+ return obj;
212
+ }
213
+
214
+
215
+ /**
216
+ * Document-class: Amalgalite::SQLite3::Blob
217
+ *
218
+ * The Blob class enables incremental IO on blob items. If you do not need
219
+ * incremental IO on a binary object, then you do not need to use Blob.
220
+ */
221
+
222
+ void Init_amalgalite_blob( )
223
+ {
224
+
225
+ VALUE ma = rb_define_module("Amalgalite");
226
+ VALUE mas = rb_define_module_under(ma, "SQLite3");
227
+
228
+ /*
229
+ * Encapsulate the SQLite3 Statement handle in a class
230
+ */
231
+ cAS_Blob = rb_define_class_under( mas, "Blob", rb_cObject );
232
+ rb_define_alloc_func(cAS_Blob, am_sqlite3_blob_alloc);
233
+ rb_define_method(cAS_Blob, "initialize", am_sqlite3_blob_initialize, 6);
234
+ rb_define_method(cAS_Blob, "close", am_sqlite3_blob_close, 0);
235
+ rb_define_method(cAS_Blob, "read", am_sqlite3_blob_read, 1);
236
+ rb_define_method(cAS_Blob, "write", am_sqlite3_blob_write, 1);
237
+ rb_define_method(cAS_Blob, "length", am_sqlite3_blob_length, 0);
238
+ }
239
+
240
+
@@ -0,0 +1,1226 @@
1
+ /* Generated by gen_constants.rb -- do not edit */
2
+
3
+ #include "amalgalite.h"
4
+ /**
5
+ * Document-class: Amalgalite::SQLite3::Constants
6
+ *
7
+ * class holding constants in the sqlite extension
8
+ */
9
+ void Init_amalgalite_constants( )
10
+ {
11
+
12
+ VALUE ma = rb_define_module("Amalgalite");
13
+ VALUE mas = rb_define_module_under(ma, "SQLite3");
14
+
15
+ /*
16
+ * module encapsulating all the SQLite C extension constants
17
+ */
18
+ VALUE mC = rb_define_module_under( mas, "Constants");
19
+ /**
20
+ * module encapsulating the SQLite3 C extension constants for Access
21
+ */
22
+ VALUE mC_Access = rb_define_module_under(mC, "Access");
23
+
24
+ /**
25
+ * module encapsulating the SQLite3 C extension constants for Authorizer
26
+ */
27
+ VALUE mC_Authorizer = rb_define_module_under(mC, "Authorizer");
28
+
29
+ /**
30
+ * module encapsulating the SQLite3 C extension constants for Changeset
31
+ */
32
+ VALUE mC_Changeset = rb_define_module_under(mC, "Changeset");
33
+
34
+ /**
35
+ * module encapsulating the SQLite3 C extension constants for Checkpoint
36
+ */
37
+ VALUE mC_Checkpoint = rb_define_module_under(mC, "Checkpoint");
38
+
39
+ /**
40
+ * module encapsulating the SQLite3 C extension constants for Config
41
+ */
42
+ VALUE mC_Config = rb_define_module_under(mC, "Config");
43
+
44
+ /**
45
+ * module encapsulating the SQLite3 C extension constants for DBConfig
46
+ */
47
+ VALUE mC_DBConfig = rb_define_module_under(mC, "DBConfig");
48
+
49
+ /**
50
+ * module encapsulating the SQLite3 C extension constants for DBStatus
51
+ */
52
+ VALUE mC_DBStatus = rb_define_module_under(mC, "DBStatus");
53
+
54
+ /**
55
+ * module encapsulating the SQLite3 C extension constants for DataType
56
+ */
57
+ VALUE mC_DataType = rb_define_module_under(mC, "DataType");
58
+
59
+ /**
60
+ * module encapsulating the SQLite3 C extension constants for FTS5
61
+ */
62
+ VALUE mC_FTS5 = rb_define_module_under(mC, "FTS5");
63
+
64
+ /**
65
+ * module encapsulating the SQLite3 C extension constants for Fcntl
66
+ */
67
+ VALUE mC_Fcntl = rb_define_module_under(mC, "Fcntl");
68
+
69
+ /**
70
+ * module encapsulating the SQLite3 C extension constants for IOCap
71
+ */
72
+ VALUE mC_IOCap = rb_define_module_under(mC, "IOCap");
73
+
74
+ /**
75
+ * module encapsulating the SQLite3 C extension constants for Index
76
+ */
77
+ VALUE mC_Index = rb_define_module_under(mC, "Index");
78
+
79
+ /**
80
+ * module encapsulating the SQLite3 C extension constants for Limit
81
+ */
82
+ VALUE mC_Limit = rb_define_module_under(mC, "Limit");
83
+
84
+ /**
85
+ * module encapsulating the SQLite3 C extension constants for Lock
86
+ */
87
+ VALUE mC_Lock = rb_define_module_under(mC, "Lock");
88
+
89
+ /**
90
+ * module encapsulating the SQLite3 C extension constants for Mutex
91
+ */
92
+ VALUE mC_Mutex = rb_define_module_under(mC, "Mutex");
93
+
94
+ /**
95
+ * module encapsulating the SQLite3 C extension constants for Open
96
+ */
97
+ VALUE mC_Open = rb_define_module_under(mC, "Open");
98
+
99
+ /**
100
+ * module encapsulating the SQLite3 C extension constants for Prepare
101
+ */
102
+ VALUE mC_Prepare = rb_define_module_under(mC, "Prepare");
103
+
104
+ /**
105
+ * module encapsulating the SQLite3 C extension constants for RTree
106
+ */
107
+ VALUE mC_RTree = rb_define_module_under(mC, "RTree");
108
+
109
+ /**
110
+ * module encapsulating the SQLite3 C extension constants for ResultCode
111
+ */
112
+ VALUE mC_ResultCode = rb_define_module_under(mC, "ResultCode");
113
+
114
+ /**
115
+ * module encapsulating the SQLite3 C extension constants for SHM
116
+ */
117
+ VALUE mC_SHM = rb_define_module_under(mC, "SHM");
118
+
119
+ /**
120
+ * module encapsulating the SQLite3 C extension constants for ScanStat
121
+ */
122
+ VALUE mC_ScanStat = rb_define_module_under(mC, "ScanStat");
123
+
124
+ /**
125
+ * module encapsulating the SQLite3 C extension constants for StatementStatus
126
+ */
127
+ VALUE mC_StatementStatus = rb_define_module_under(mC, "StatementStatus");
128
+
129
+ /**
130
+ * module encapsulating the SQLite3 C extension constants for Status
131
+ */
132
+ VALUE mC_Status = rb_define_module_under(mC, "Status");
133
+
134
+ /**
135
+ * module encapsulating the SQLite3 C extension constants for Sync
136
+ */
137
+ VALUE mC_Sync = rb_define_module_under(mC, "Sync");
138
+
139
+ /**
140
+ * module encapsulating the SQLite3 C extension constants for TextEncoding
141
+ */
142
+ VALUE mC_TextEncoding = rb_define_module_under(mC, "TextEncoding");
143
+
144
+ /**
145
+ * module encapsulating the SQLite3 C extension constants for Trace
146
+ */
147
+ VALUE mC_Trace = rb_define_module_under(mC, "Trace");
148
+
149
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
150
+ rb_define_const(mC_Access, "EXISTS", INT2FIX(SQLITE_ACCESS_EXISTS));
151
+
152
+ /* 2 -- Unused */
153
+ rb_define_const(mC_Access, "READ", INT2FIX(SQLITE_ACCESS_READ));
154
+
155
+ /* 1 -- Used by PRAGMA temp_store_directory */
156
+ rb_define_const(mC_Access, "READWRITE", INT2FIX(SQLITE_ACCESS_READWRITE));
157
+
158
+ /* 26 -- Database Name Table Name */
159
+ rb_define_const(mC_Authorizer, "ALTER_TABLE", INT2FIX(SQLITE_ALTER_TABLE));
160
+
161
+ /* 28 -- Table Name NULL */
162
+ rb_define_const(mC_Authorizer, "ANALYZE", INT2FIX(SQLITE_ANALYZE));
163
+
164
+ /* 24 -- Filename NULL */
165
+ rb_define_const(mC_Authorizer, "ATTACH", INT2FIX(SQLITE_ATTACH));
166
+
167
+ /* 0 -- No longer used */
168
+ rb_define_const(mC_Authorizer, "COPY", INT2FIX(SQLITE_COPY));
169
+
170
+ /* 1 -- Index Name Table Name */
171
+ rb_define_const(mC_Authorizer, "CREATE_INDEX", INT2FIX(SQLITE_CREATE_INDEX));
172
+
173
+ /* 2 -- Table Name NULL */
174
+ rb_define_const(mC_Authorizer, "CREATE_TABLE", INT2FIX(SQLITE_CREATE_TABLE));
175
+
176
+ /* 3 -- Index Name Table Name */
177
+ rb_define_const(mC_Authorizer, "CREATE_TEMP_INDEX", INT2FIX(SQLITE_CREATE_TEMP_INDEX));
178
+
179
+ /* 4 -- Table Name NULL */
180
+ rb_define_const(mC_Authorizer, "CREATE_TEMP_TABLE", INT2FIX(SQLITE_CREATE_TEMP_TABLE));
181
+
182
+ /* 5 -- Trigger Name Table Name */
183
+ rb_define_const(mC_Authorizer, "CREATE_TEMP_TRIGGER", INT2FIX(SQLITE_CREATE_TEMP_TRIGGER));
184
+
185
+ /* 6 -- View Name NULL */
186
+ rb_define_const(mC_Authorizer, "CREATE_TEMP_VIEW", INT2FIX(SQLITE_CREATE_TEMP_VIEW));
187
+
188
+ /* 7 -- Trigger Name Table Name */
189
+ rb_define_const(mC_Authorizer, "CREATE_TRIGGER", INT2FIX(SQLITE_CREATE_TRIGGER));
190
+
191
+ /* 8 -- View Name NULL */
192
+ rb_define_const(mC_Authorizer, "CREATE_VIEW", INT2FIX(SQLITE_CREATE_VIEW));
193
+
194
+ /* 29 -- Table Name Module Name */
195
+ rb_define_const(mC_Authorizer, "CREATE_VTABLE", INT2FIX(SQLITE_CREATE_VTABLE));
196
+
197
+ /* 9 -- Table Name NULL */
198
+ rb_define_const(mC_Authorizer, "DELETE", INT2FIX(SQLITE_DELETE));
199
+
200
+ /* 1 -- Abort the SQL statement with an error */
201
+ rb_define_const(mC_Authorizer, "DENY", INT2FIX(SQLITE_DENY));
202
+
203
+ /* 25 -- Database Name NULL */
204
+ rb_define_const(mC_Authorizer, "DETACH", INT2FIX(SQLITE_DETACH));
205
+
206
+ /* 10 -- Index Name Table Name */
207
+ rb_define_const(mC_Authorizer, "DROP_INDEX", INT2FIX(SQLITE_DROP_INDEX));
208
+
209
+ /* 11 -- Table Name NULL */
210
+ rb_define_const(mC_Authorizer, "DROP_TABLE", INT2FIX(SQLITE_DROP_TABLE));
211
+
212
+ /* 12 -- Index Name Table Name */
213
+ rb_define_const(mC_Authorizer, "DROP_TEMP_INDEX", INT2FIX(SQLITE_DROP_TEMP_INDEX));
214
+
215
+ /* 13 -- Table Name NULL */
216
+ rb_define_const(mC_Authorizer, "DROP_TEMP_TABLE", INT2FIX(SQLITE_DROP_TEMP_TABLE));
217
+
218
+ /* 14 -- Trigger Name Table Name */
219
+ rb_define_const(mC_Authorizer, "DROP_TEMP_TRIGGER", INT2FIX(SQLITE_DROP_TEMP_TRIGGER));
220
+
221
+ /* 15 -- View Name NULL */
222
+ rb_define_const(mC_Authorizer, "DROP_TEMP_VIEW", INT2FIX(SQLITE_DROP_TEMP_VIEW));
223
+
224
+ /* 16 -- Trigger Name Table Name */
225
+ rb_define_const(mC_Authorizer, "DROP_TRIGGER", INT2FIX(SQLITE_DROP_TRIGGER));
226
+
227
+ /* 17 -- View Name NULL */
228
+ rb_define_const(mC_Authorizer, "DROP_VIEW", INT2FIX(SQLITE_DROP_VIEW));
229
+
230
+ /* 30 -- Table Name Module Name */
231
+ rb_define_const(mC_Authorizer, "DROP_VTABLE", INT2FIX(SQLITE_DROP_VTABLE));
232
+
233
+ /* 31 -- NULL Function Name */
234
+ rb_define_const(mC_Authorizer, "FUNCTION", INT2FIX(SQLITE_FUNCTION));
235
+
236
+ /* 2 -- Don't allow access, but don't generate an error */
237
+ rb_define_const(mC_Authorizer, "IGNORE", INT2FIX(SQLITE_IGNORE));
238
+
239
+ /* 18 -- Table Name NULL */
240
+ rb_define_const(mC_Authorizer, "INSERT", INT2FIX(SQLITE_INSERT));
241
+
242
+ /* 19 -- Pragma Name 1st arg or NULL */
243
+ rb_define_const(mC_Authorizer, "PRAGMA", INT2FIX(SQLITE_PRAGMA));
244
+
245
+ /* 20 -- Table Name Column Name */
246
+ rb_define_const(mC_Authorizer, "READ", INT2FIX(SQLITE_READ));
247
+
248
+ /* 33 -- NULL NULL */
249
+ rb_define_const(mC_Authorizer, "RECURSIVE", INT2FIX(SQLITE_RECURSIVE));
250
+
251
+ /* 27 -- Index Name NULL */
252
+ rb_define_const(mC_Authorizer, "REINDEX", INT2FIX(SQLITE_REINDEX));
253
+
254
+ /* 32 -- Operation Savepoint Name */
255
+ rb_define_const(mC_Authorizer, "SAVEPOINT", INT2FIX(SQLITE_SAVEPOINT));
256
+
257
+ /* 21 -- NULL NULL */
258
+ rb_define_const(mC_Authorizer, "SELECT", INT2FIX(SQLITE_SELECT));
259
+
260
+ /* 22 -- Operation NULL */
261
+ rb_define_const(mC_Authorizer, "TRANSACTION", INT2FIX(SQLITE_TRANSACTION));
262
+
263
+ /* 23 -- Table Name Column Name */
264
+ rb_define_const(mC_Authorizer, "UPDATE", INT2FIX(SQLITE_UPDATE));
265
+
266
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
267
+ rb_define_const(mC_Changeset, "ABORT", INT2FIX(SQLITE_CHANGESET_ABORT));
268
+
269
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
270
+ rb_define_const(mC_Changeset, "CONFLICT", INT2FIX(SQLITE_CHANGESET_CONFLICT));
271
+
272
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
273
+ rb_define_const(mC_Changeset, "CONSTRAINT", INT2FIX(SQLITE_CHANGESET_CONSTRAINT));
274
+
275
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
276
+ rb_define_const(mC_Changeset, "DATA", INT2FIX(SQLITE_CHANGESET_DATA));
277
+
278
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
279
+ rb_define_const(mC_Changeset, "FOREIGN_KEY", INT2FIX(SQLITE_CHANGESET_FOREIGN_KEY));
280
+
281
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
282
+ rb_define_const(mC_Changeset, "NOTFOUND", INT2FIX(SQLITE_CHANGESET_NOTFOUND));
283
+
284
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
285
+ rb_define_const(mC_Changeset, "OMIT", INT2FIX(SQLITE_CHANGESET_OMIT));
286
+
287
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
288
+ rb_define_const(mC_Changeset, "REPLACE", INT2FIX(SQLITE_CHANGESET_REPLACE));
289
+
290
+ /* 1 -- Wait for writers, then checkpoint */
291
+ rb_define_const(mC_Checkpoint, "FULL", INT2FIX(SQLITE_CHECKPOINT_FULL));
292
+
293
+ /* 0 -- Do as much as possible w/o blocking */
294
+ rb_define_const(mC_Checkpoint, "PASSIVE", INT2FIX(SQLITE_CHECKPOINT_PASSIVE));
295
+
296
+ /* 2 -- Like FULL but wait for for readers */
297
+ rb_define_const(mC_Checkpoint, "RESTART", INT2FIX(SQLITE_CHECKPOINT_RESTART));
298
+
299
+ /* 3 -- Like RESTART but also truncate WAL */
300
+ rb_define_const(mC_Checkpoint, "TRUNCATE", INT2FIX(SQLITE_CHECKPOINT_TRUNCATE));
301
+
302
+ /* 20 -- int */
303
+ rb_define_const(mC_Config, "COVERING_INDEX_SCAN", INT2FIX(SQLITE_CONFIG_COVERING_INDEX_SCAN));
304
+
305
+ /* 5 -- sqlite3_mem_methods* */
306
+ rb_define_const(mC_Config, "GETMALLOC", INT2FIX(SQLITE_CONFIG_GETMALLOC));
307
+
308
+ /* 11 -- sqlite3_mutex_methods* */
309
+ rb_define_const(mC_Config, "GETMUTEX", INT2FIX(SQLITE_CONFIG_GETMUTEX));
310
+
311
+ /* 15 -- no-op */
312
+ rb_define_const(mC_Config, "GETPCACHE", INT2FIX(SQLITE_CONFIG_GETPCACHE));
313
+
314
+ /* 19 -- sqlite3_pcache_methods2* */
315
+ rb_define_const(mC_Config, "GETPCACHE2", INT2FIX(SQLITE_CONFIG_GETPCACHE2));
316
+
317
+ /* 8 -- void*, int nByte, int min */
318
+ rb_define_const(mC_Config, "HEAP", INT2FIX(SQLITE_CONFIG_HEAP));
319
+
320
+ /* 16 -- xFunc, void* */
321
+ rb_define_const(mC_Config, "LOG", INT2FIX(SQLITE_CONFIG_LOG));
322
+
323
+ /* 13 -- int int */
324
+ rb_define_const(mC_Config, "LOOKASIDE", INT2FIX(SQLITE_CONFIG_LOOKASIDE));
325
+
326
+ /* 4 -- sqlite3_mem_methods* */
327
+ rb_define_const(mC_Config, "MALLOC", INT2FIX(SQLITE_CONFIG_MALLOC));
328
+
329
+ /* 9 -- boolean */
330
+ rb_define_const(mC_Config, "MEMSTATUS", INT2FIX(SQLITE_CONFIG_MEMSTATUS));
331
+
332
+ /* 22 -- sqlite3_int64, sqlite3_int64 */
333
+ rb_define_const(mC_Config, "MMAP_SIZE", INT2FIX(SQLITE_CONFIG_MMAP_SIZE));
334
+
335
+ /* 2 -- nil */
336
+ rb_define_const(mC_Config, "MULTITHREAD", INT2FIX(SQLITE_CONFIG_MULTITHREAD));
337
+
338
+ /* 10 -- sqlite3_mutex_methods* */
339
+ rb_define_const(mC_Config, "MUTEX", INT2FIX(SQLITE_CONFIG_MUTEX));
340
+
341
+ /* 7 -- void*, int sz, int N */
342
+ rb_define_const(mC_Config, "PAGECACHE", INT2FIX(SQLITE_CONFIG_PAGECACHE));
343
+
344
+ /* 14 -- no-op */
345
+ rb_define_const(mC_Config, "PCACHE", INT2FIX(SQLITE_CONFIG_PCACHE));
346
+
347
+ /* 18 -- sqlite3_pcache_methods2* */
348
+ rb_define_const(mC_Config, "PCACHE2", INT2FIX(SQLITE_CONFIG_PCACHE2));
349
+
350
+ /* 24 -- int *psz */
351
+ rb_define_const(mC_Config, "PCACHE_HDRSZ", INT2FIX(SQLITE_CONFIG_PCACHE_HDRSZ));
352
+
353
+ /* 25 -- unsigned int szPma */
354
+ rb_define_const(mC_Config, "PMASZ", INT2FIX(SQLITE_CONFIG_PMASZ));
355
+
356
+ /* 6 -- No longer used */
357
+ rb_define_const(mC_Config, "SCRATCH", INT2FIX(SQLITE_CONFIG_SCRATCH));
358
+
359
+ /* 3 -- nil */
360
+ rb_define_const(mC_Config, "SERIALIZED", INT2FIX(SQLITE_CONFIG_SERIALIZED));
361
+
362
+ /* 1 -- nil */
363
+ rb_define_const(mC_Config, "SINGLETHREAD", INT2FIX(SQLITE_CONFIG_SINGLETHREAD));
364
+
365
+ /* 27 -- boolean */
366
+ rb_define_const(mC_Config, "SMALL_MALLOC", INT2FIX(SQLITE_CONFIG_SMALL_MALLOC));
367
+
368
+ /* 21 -- xSqllog, void* */
369
+ rb_define_const(mC_Config, "SQLLOG", INT2FIX(SQLITE_CONFIG_SQLLOG));
370
+
371
+ /* 26 -- int nByte */
372
+ rb_define_const(mC_Config, "STMTJRNL_SPILL", INT2FIX(SQLITE_CONFIG_STMTJRNL_SPILL));
373
+
374
+ /* 17 -- int */
375
+ rb_define_const(mC_Config, "URI", INT2FIX(SQLITE_CONFIG_URI));
376
+
377
+ /* 23 -- int nByte */
378
+ rb_define_const(mC_Config, "WIN32_HEAPSIZE", INT2FIX(SQLITE_CONFIG_WIN32_HEAPSIZE));
379
+
380
+ /* 1002 -- int int* */
381
+ rb_define_const(mC_DBConfig, "ENABLE_FKEY", INT2FIX(SQLITE_DBCONFIG_ENABLE_FKEY));
382
+
383
+ /* 1004 -- int int* */
384
+ rb_define_const(mC_DBConfig, "ENABLE_FTS3_TOKENIZER", INT2FIX(SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER));
385
+
386
+ /* 1005 -- int int* */
387
+ rb_define_const(mC_DBConfig, "ENABLE_LOAD_EXTENSION", INT2FIX(SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION));
388
+
389
+ /* 1007 -- int int* */
390
+ rb_define_const(mC_DBConfig, "ENABLE_QPSG", INT2FIX(SQLITE_DBCONFIG_ENABLE_QPSG));
391
+
392
+ /* 1003 -- int int* */
393
+ rb_define_const(mC_DBConfig, "ENABLE_TRIGGER", INT2FIX(SQLITE_DBCONFIG_ENABLE_TRIGGER));
394
+
395
+ /* 1001 -- void* int int */
396
+ rb_define_const(mC_DBConfig, "LOOKASIDE", INT2FIX(SQLITE_DBCONFIG_LOOKASIDE));
397
+
398
+ /* 1000 -- const char* */
399
+ rb_define_const(mC_DBConfig, "MAINDBNAME", INT2FIX(SQLITE_DBCONFIG_MAINDBNAME));
400
+
401
+ /* 1006 -- int int* */
402
+ rb_define_const(mC_DBConfig, "NO_CKPT_ON_CLOSE", INT2FIX(SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE));
403
+
404
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
405
+ rb_define_const(mC_DBStatus, "CACHE_HIT", INT2FIX(SQLITE_DBSTATUS_CACHE_HIT));
406
+
407
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
408
+ rb_define_const(mC_DBStatus, "CACHE_MISS", INT2FIX(SQLITE_DBSTATUS_CACHE_MISS));
409
+
410
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
411
+ rb_define_const(mC_DBStatus, "CACHE_USED", INT2FIX(SQLITE_DBSTATUS_CACHE_USED));
412
+
413
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
414
+ rb_define_const(mC_DBStatus, "CACHE_USED_SHARED", INT2FIX(SQLITE_DBSTATUS_CACHE_USED_SHARED));
415
+
416
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
417
+ rb_define_const(mC_DBStatus, "CACHE_WRITE", INT2FIX(SQLITE_DBSTATUS_CACHE_WRITE));
418
+
419
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
420
+ rb_define_const(mC_DBStatus, "DEFERRED_FKS", INT2FIX(SQLITE_DBSTATUS_DEFERRED_FKS));
421
+
422
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
423
+ rb_define_const(mC_DBStatus, "LOOKASIDE_HIT", INT2FIX(SQLITE_DBSTATUS_LOOKASIDE_HIT));
424
+
425
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
426
+ rb_define_const(mC_DBStatus, "LOOKASIDE_MISS_FULL", INT2FIX(SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL));
427
+
428
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
429
+ rb_define_const(mC_DBStatus, "LOOKASIDE_MISS_SIZE", INT2FIX(SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE));
430
+
431
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
432
+ rb_define_const(mC_DBStatus, "LOOKASIDE_USED", INT2FIX(SQLITE_DBSTATUS_LOOKASIDE_USED));
433
+
434
+ /* 11 -- Largest defined DBSTATUS */
435
+ rb_define_const(mC_DBStatus, "MAX", INT2FIX(SQLITE_DBSTATUS_MAX));
436
+
437
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
438
+ rb_define_const(mC_DBStatus, "SCHEMA_USED", INT2FIX(SQLITE_DBSTATUS_SCHEMA_USED));
439
+
440
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
441
+ rb_define_const(mC_DBStatus, "STMT_USED", INT2FIX(SQLITE_DBSTATUS_STMT_USED));
442
+
443
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
444
+ rb_define_const(mC_DataType, "TEXT", INT2FIX(SQLITE3_TEXT));
445
+
446
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
447
+ rb_define_const(mC_DataType, "BLOB", INT2FIX(SQLITE_BLOB));
448
+
449
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
450
+ rb_define_const(mC_DataType, "FLOAT", INT2FIX(SQLITE_FLOAT));
451
+
452
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
453
+ rb_define_const(mC_DataType, "INTEGER", INT2FIX(SQLITE_INTEGER));
454
+
455
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
456
+ rb_define_const(mC_DataType, "NULL", INT2FIX(SQLITE_NULL));
457
+
458
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
459
+ rb_define_const(mC_FTS5, "TOKENIZE_AUX", INT2FIX(FTS5_TOKENIZE_AUX));
460
+
461
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
462
+ rb_define_const(mC_FTS5, "TOKENIZE_DOCUMENT", INT2FIX(FTS5_TOKENIZE_DOCUMENT));
463
+
464
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
465
+ rb_define_const(mC_FTS5, "TOKENIZE_PREFIX", INT2FIX(FTS5_TOKENIZE_PREFIX));
466
+
467
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
468
+ rb_define_const(mC_FTS5, "TOKENIZE_QUERY", INT2FIX(FTS5_TOKENIZE_QUERY));
469
+
470
+ /* 0x0001 -- Same position as prev. token */
471
+ rb_define_const(mC_FTS5, "TOKEN_COLOCATED", INT2FIX(FTS5_TOKEN_COLOCATED));
472
+
473
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
474
+ rb_define_const(mC_Fcntl, "BEGIN_ATOMIC_WRITE", INT2FIX(SQLITE_FCNTL_BEGIN_ATOMIC_WRITE));
475
+
476
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
477
+ rb_define_const(mC_Fcntl, "BUSYHANDLER", INT2FIX(SQLITE_FCNTL_BUSYHANDLER));
478
+
479
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
480
+ rb_define_const(mC_Fcntl, "CHUNK_SIZE", INT2FIX(SQLITE_FCNTL_CHUNK_SIZE));
481
+
482
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
483
+ rb_define_const(mC_Fcntl, "COMMIT_ATOMIC_WRITE", INT2FIX(SQLITE_FCNTL_COMMIT_ATOMIC_WRITE));
484
+
485
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
486
+ rb_define_const(mC_Fcntl, "COMMIT_PHASETWO", INT2FIX(SQLITE_FCNTL_COMMIT_PHASETWO));
487
+
488
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
489
+ rb_define_const(mC_Fcntl, "FILE_POINTER", INT2FIX(SQLITE_FCNTL_FILE_POINTER));
490
+
491
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
492
+ rb_define_const(mC_Fcntl, "GET_LOCKPROXYFILE", INT2FIX(SQLITE_FCNTL_GET_LOCKPROXYFILE));
493
+
494
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
495
+ rb_define_const(mC_Fcntl, "HAS_MOVED", INT2FIX(SQLITE_FCNTL_HAS_MOVED));
496
+
497
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
498
+ rb_define_const(mC_Fcntl, "JOURNAL_POINTER", INT2FIX(SQLITE_FCNTL_JOURNAL_POINTER));
499
+
500
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
501
+ rb_define_const(mC_Fcntl, "LAST_ERRNO", INT2FIX(SQLITE_FCNTL_LAST_ERRNO));
502
+
503
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
504
+ rb_define_const(mC_Fcntl, "LOCKSTATE", INT2FIX(SQLITE_FCNTL_LOCKSTATE));
505
+
506
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
507
+ rb_define_const(mC_Fcntl, "MMAP_SIZE", INT2FIX(SQLITE_FCNTL_MMAP_SIZE));
508
+
509
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
510
+ rb_define_const(mC_Fcntl, "OVERWRITE", INT2FIX(SQLITE_FCNTL_OVERWRITE));
511
+
512
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
513
+ rb_define_const(mC_Fcntl, "PDB", INT2FIX(SQLITE_FCNTL_PDB));
514
+
515
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
516
+ rb_define_const(mC_Fcntl, "PERSIST_WAL", INT2FIX(SQLITE_FCNTL_PERSIST_WAL));
517
+
518
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
519
+ rb_define_const(mC_Fcntl, "POWERSAFE_OVERWRITE", INT2FIX(SQLITE_FCNTL_POWERSAFE_OVERWRITE));
520
+
521
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
522
+ rb_define_const(mC_Fcntl, "PRAGMA", INT2FIX(SQLITE_FCNTL_PRAGMA));
523
+
524
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
525
+ rb_define_const(mC_Fcntl, "RBU", INT2FIX(SQLITE_FCNTL_RBU));
526
+
527
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
528
+ rb_define_const(mC_Fcntl, "ROLLBACK_ATOMIC_WRITE", INT2FIX(SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE));
529
+
530
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
531
+ rb_define_const(mC_Fcntl, "SET_LOCKPROXYFILE", INT2FIX(SQLITE_FCNTL_SET_LOCKPROXYFILE));
532
+
533
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
534
+ rb_define_const(mC_Fcntl, "SIZE_HINT", INT2FIX(SQLITE_FCNTL_SIZE_HINT));
535
+
536
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
537
+ rb_define_const(mC_Fcntl, "SYNC", INT2FIX(SQLITE_FCNTL_SYNC));
538
+
539
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
540
+ rb_define_const(mC_Fcntl, "SYNC_OMITTED", INT2FIX(SQLITE_FCNTL_SYNC_OMITTED));
541
+
542
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
543
+ rb_define_const(mC_Fcntl, "TEMPFILENAME", INT2FIX(SQLITE_FCNTL_TEMPFILENAME));
544
+
545
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
546
+ rb_define_const(mC_Fcntl, "TRACE", INT2FIX(SQLITE_FCNTL_TRACE));
547
+
548
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
549
+ rb_define_const(mC_Fcntl, "VFSNAME", INT2FIX(SQLITE_FCNTL_VFSNAME));
550
+
551
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
552
+ rb_define_const(mC_Fcntl, "VFS_POINTER", INT2FIX(SQLITE_FCNTL_VFS_POINTER));
553
+
554
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
555
+ rb_define_const(mC_Fcntl, "WAL_BLOCK", INT2FIX(SQLITE_FCNTL_WAL_BLOCK));
556
+
557
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
558
+ rb_define_const(mC_Fcntl, "WIN32_AV_RETRY", INT2FIX(SQLITE_FCNTL_WIN32_AV_RETRY));
559
+
560
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
561
+ rb_define_const(mC_Fcntl, "WIN32_GET_HANDLE", INT2FIX(SQLITE_FCNTL_WIN32_GET_HANDLE));
562
+
563
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
564
+ rb_define_const(mC_Fcntl, "WIN32_SET_HANDLE", INT2FIX(SQLITE_FCNTL_WIN32_SET_HANDLE));
565
+
566
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
567
+ rb_define_const(mC_Fcntl, "ZIPVFS", INT2FIX(SQLITE_FCNTL_ZIPVFS));
568
+
569
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
570
+ rb_define_const(mC_IOCap, "ATOMIC", INT2FIX(SQLITE_IOCAP_ATOMIC));
571
+
572
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
573
+ rb_define_const(mC_IOCap, "ATOMIC16K", INT2FIX(SQLITE_IOCAP_ATOMIC16K));
574
+
575
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
576
+ rb_define_const(mC_IOCap, "ATOMIC1K", INT2FIX(SQLITE_IOCAP_ATOMIC1K));
577
+
578
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
579
+ rb_define_const(mC_IOCap, "ATOMIC2K", INT2FIX(SQLITE_IOCAP_ATOMIC2K));
580
+
581
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
582
+ rb_define_const(mC_IOCap, "ATOMIC32K", INT2FIX(SQLITE_IOCAP_ATOMIC32K));
583
+
584
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
585
+ rb_define_const(mC_IOCap, "ATOMIC4K", INT2FIX(SQLITE_IOCAP_ATOMIC4K));
586
+
587
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
588
+ rb_define_const(mC_IOCap, "ATOMIC512", INT2FIX(SQLITE_IOCAP_ATOMIC512));
589
+
590
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
591
+ rb_define_const(mC_IOCap, "ATOMIC64K", INT2FIX(SQLITE_IOCAP_ATOMIC64K));
592
+
593
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
594
+ rb_define_const(mC_IOCap, "ATOMIC8K", INT2FIX(SQLITE_IOCAP_ATOMIC8K));
595
+
596
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
597
+ rb_define_const(mC_IOCap, "BATCH_ATOMIC", INT2FIX(SQLITE_IOCAP_BATCH_ATOMIC));
598
+
599
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
600
+ rb_define_const(mC_IOCap, "IMMUTABLE", INT2FIX(SQLITE_IOCAP_IMMUTABLE));
601
+
602
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
603
+ rb_define_const(mC_IOCap, "POWERSAFE_OVERWRITE", INT2FIX(SQLITE_IOCAP_POWERSAFE_OVERWRITE));
604
+
605
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
606
+ rb_define_const(mC_IOCap, "SAFE_APPEND", INT2FIX(SQLITE_IOCAP_SAFE_APPEND));
607
+
608
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
609
+ rb_define_const(mC_IOCap, "SEQUENTIAL", INT2FIX(SQLITE_IOCAP_SEQUENTIAL));
610
+
611
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
612
+ rb_define_const(mC_IOCap, "UNDELETABLE_WHEN_OPEN", INT2FIX(SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN));
613
+
614
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
615
+ rb_define_const(mC_Index, "CONSTRAINT_EQ", INT2FIX(SQLITE_INDEX_CONSTRAINT_EQ));
616
+
617
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
618
+ rb_define_const(mC_Index, "CONSTRAINT_GE", INT2FIX(SQLITE_INDEX_CONSTRAINT_GE));
619
+
620
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
621
+ rb_define_const(mC_Index, "CONSTRAINT_GLOB", INT2FIX(SQLITE_INDEX_CONSTRAINT_GLOB));
622
+
623
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
624
+ rb_define_const(mC_Index, "CONSTRAINT_GT", INT2FIX(SQLITE_INDEX_CONSTRAINT_GT));
625
+
626
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
627
+ rb_define_const(mC_Index, "CONSTRAINT_IS", INT2FIX(SQLITE_INDEX_CONSTRAINT_IS));
628
+
629
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
630
+ rb_define_const(mC_Index, "CONSTRAINT_ISNOT", INT2FIX(SQLITE_INDEX_CONSTRAINT_ISNOT));
631
+
632
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
633
+ rb_define_const(mC_Index, "CONSTRAINT_ISNOTNULL", INT2FIX(SQLITE_INDEX_CONSTRAINT_ISNOTNULL));
634
+
635
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
636
+ rb_define_const(mC_Index, "CONSTRAINT_ISNULL", INT2FIX(SQLITE_INDEX_CONSTRAINT_ISNULL));
637
+
638
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
639
+ rb_define_const(mC_Index, "CONSTRAINT_LE", INT2FIX(SQLITE_INDEX_CONSTRAINT_LE));
640
+
641
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
642
+ rb_define_const(mC_Index, "CONSTRAINT_LIKE", INT2FIX(SQLITE_INDEX_CONSTRAINT_LIKE));
643
+
644
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
645
+ rb_define_const(mC_Index, "CONSTRAINT_LT", INT2FIX(SQLITE_INDEX_CONSTRAINT_LT));
646
+
647
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
648
+ rb_define_const(mC_Index, "CONSTRAINT_MATCH", INT2FIX(SQLITE_INDEX_CONSTRAINT_MATCH));
649
+
650
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
651
+ rb_define_const(mC_Index, "CONSTRAINT_NE", INT2FIX(SQLITE_INDEX_CONSTRAINT_NE));
652
+
653
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
654
+ rb_define_const(mC_Index, "CONSTRAINT_REGEXP", INT2FIX(SQLITE_INDEX_CONSTRAINT_REGEXP));
655
+
656
+ /* 1 -- Scan visits at most 1 row */
657
+ rb_define_const(mC_Index, "SCAN_UNIQUE", INT2FIX(SQLITE_INDEX_SCAN_UNIQUE));
658
+
659
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
660
+ rb_define_const(mC_Limit, "ATTACHED", INT2FIX(SQLITE_LIMIT_ATTACHED));
661
+
662
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
663
+ rb_define_const(mC_Limit, "COLUMN", INT2FIX(SQLITE_LIMIT_COLUMN));
664
+
665
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
666
+ rb_define_const(mC_Limit, "COMPOUND_SELECT", INT2FIX(SQLITE_LIMIT_COMPOUND_SELECT));
667
+
668
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
669
+ rb_define_const(mC_Limit, "EXPR_DEPTH", INT2FIX(SQLITE_LIMIT_EXPR_DEPTH));
670
+
671
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
672
+ rb_define_const(mC_Limit, "FUNCTION_ARG", INT2FIX(SQLITE_LIMIT_FUNCTION_ARG));
673
+
674
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
675
+ rb_define_const(mC_Limit, "LENGTH", INT2FIX(SQLITE_LIMIT_LENGTH));
676
+
677
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
678
+ rb_define_const(mC_Limit, "LIKE_PATTERN_LENGTH", INT2FIX(SQLITE_LIMIT_LIKE_PATTERN_LENGTH));
679
+
680
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
681
+ rb_define_const(mC_Limit, "SQL_LENGTH", INT2FIX(SQLITE_LIMIT_SQL_LENGTH));
682
+
683
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
684
+ rb_define_const(mC_Limit, "TRIGGER_DEPTH", INT2FIX(SQLITE_LIMIT_TRIGGER_DEPTH));
685
+
686
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
687
+ rb_define_const(mC_Limit, "VARIABLE_NUMBER", INT2FIX(SQLITE_LIMIT_VARIABLE_NUMBER));
688
+
689
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
690
+ rb_define_const(mC_Limit, "VDBE_OP", INT2FIX(SQLITE_LIMIT_VDBE_OP));
691
+
692
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
693
+ rb_define_const(mC_Limit, "WORKER_THREADS", INT2FIX(SQLITE_LIMIT_WORKER_THREADS));
694
+
695
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
696
+ rb_define_const(mC_Lock, "EXCLUSIVE", INT2FIX(SQLITE_LOCK_EXCLUSIVE));
697
+
698
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
699
+ rb_define_const(mC_Lock, "NONE", INT2FIX(SQLITE_LOCK_NONE));
700
+
701
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
702
+ rb_define_const(mC_Lock, "PENDING", INT2FIX(SQLITE_LOCK_PENDING));
703
+
704
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
705
+ rb_define_const(mC_Lock, "RESERVED", INT2FIX(SQLITE_LOCK_RESERVED));
706
+
707
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
708
+ rb_define_const(mC_Lock, "SHARED", INT2FIX(SQLITE_LOCK_SHARED));
709
+
710
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
711
+ rb_define_const(mC_Mutex, "FAST", INT2FIX(SQLITE_MUTEX_FAST));
712
+
713
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
714
+ rb_define_const(mC_Mutex, "RECURSIVE", INT2FIX(SQLITE_MUTEX_RECURSIVE));
715
+
716
+ /* 8 -- For use by application */
717
+ rb_define_const(mC_Mutex, "STATIC_APP1", INT2FIX(SQLITE_MUTEX_STATIC_APP1));
718
+
719
+ /* 9 -- For use by application */
720
+ rb_define_const(mC_Mutex, "STATIC_APP2", INT2FIX(SQLITE_MUTEX_STATIC_APP2));
721
+
722
+ /* 10 -- For use by application */
723
+ rb_define_const(mC_Mutex, "STATIC_APP3", INT2FIX(SQLITE_MUTEX_STATIC_APP3));
724
+
725
+ /* 6 -- lru page list */
726
+ rb_define_const(mC_Mutex, "STATIC_LRU", INT2FIX(SQLITE_MUTEX_STATIC_LRU));
727
+
728
+ /* 7 -- NOT USED */
729
+ rb_define_const(mC_Mutex, "STATIC_LRU2", INT2FIX(SQLITE_MUTEX_STATIC_LRU2));
730
+
731
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
732
+ rb_define_const(mC_Mutex, "STATIC_MASTER", INT2FIX(SQLITE_MUTEX_STATIC_MASTER));
733
+
734
+ /* 3 -- sqlite3_malloc() */
735
+ rb_define_const(mC_Mutex, "STATIC_MEM", INT2FIX(SQLITE_MUTEX_STATIC_MEM));
736
+
737
+ /* 4 -- NOT USED */
738
+ rb_define_const(mC_Mutex, "STATIC_MEM2", INT2FIX(SQLITE_MUTEX_STATIC_MEM2));
739
+
740
+ /* 4 -- sqlite3BtreeOpen() */
741
+ rb_define_const(mC_Mutex, "STATIC_OPEN", INT2FIX(SQLITE_MUTEX_STATIC_OPEN));
742
+
743
+ /* 7 -- sqlite3PageMalloc() */
744
+ rb_define_const(mC_Mutex, "STATIC_PMEM", INT2FIX(SQLITE_MUTEX_STATIC_PMEM));
745
+
746
+ /* 5 -- sqlite3_randomness() */
747
+ rb_define_const(mC_Mutex, "STATIC_PRNG", INT2FIX(SQLITE_MUTEX_STATIC_PRNG));
748
+
749
+ /* 11 -- For use by built-in VFS */
750
+ rb_define_const(mC_Mutex, "STATIC_VFS1", INT2FIX(SQLITE_MUTEX_STATIC_VFS1));
751
+
752
+ /* 12 -- For use by extension VFS */
753
+ rb_define_const(mC_Mutex, "STATIC_VFS2", INT2FIX(SQLITE_MUTEX_STATIC_VFS2));
754
+
755
+ /* 13 -- For use by application VFS */
756
+ rb_define_const(mC_Mutex, "STATIC_VFS3", INT2FIX(SQLITE_MUTEX_STATIC_VFS3));
757
+
758
+ /* 0x00000020 -- VFS only */
759
+ rb_define_const(mC_Open, "AUTOPROXY", INT2FIX(SQLITE_OPEN_AUTOPROXY));
760
+
761
+ /* 0x00000004 -- Ok for sqlite3_open_v2() */
762
+ rb_define_const(mC_Open, "CREATE", INT2FIX(SQLITE_OPEN_CREATE));
763
+
764
+ /* 0x00000008 -- VFS only */
765
+ rb_define_const(mC_Open, "DELETEONCLOSE", INT2FIX(SQLITE_OPEN_DELETEONCLOSE));
766
+
767
+ /* 0x00000010 -- VFS only */
768
+ rb_define_const(mC_Open, "EXCLUSIVE", INT2FIX(SQLITE_OPEN_EXCLUSIVE));
769
+
770
+ /* 0x00010000 -- Ok for sqlite3_open_v2() */
771
+ rb_define_const(mC_Open, "FULLMUTEX", INT2FIX(SQLITE_OPEN_FULLMUTEX));
772
+
773
+ /* 0x00000100 -- VFS only */
774
+ rb_define_const(mC_Open, "MAIN_DB", INT2FIX(SQLITE_OPEN_MAIN_DB));
775
+
776
+ /* 0x00000800 -- VFS only */
777
+ rb_define_const(mC_Open, "MAIN_JOURNAL", INT2FIX(SQLITE_OPEN_MAIN_JOURNAL));
778
+
779
+ /* 0x00004000 -- VFS only */
780
+ rb_define_const(mC_Open, "MASTER_JOURNAL", INT2FIX(SQLITE_OPEN_MASTER_JOURNAL));
781
+
782
+ /* 0x00000080 -- Ok for sqlite3_open_v2() */
783
+ rb_define_const(mC_Open, "MEMORY", INT2FIX(SQLITE_OPEN_MEMORY));
784
+
785
+ /* 0x00008000 -- Ok for sqlite3_open_v2() */
786
+ rb_define_const(mC_Open, "NOMUTEX", INT2FIX(SQLITE_OPEN_NOMUTEX));
787
+
788
+ /* 0x00040000 -- Ok for sqlite3_open_v2() */
789
+ rb_define_const(mC_Open, "PRIVATECACHE", INT2FIX(SQLITE_OPEN_PRIVATECACHE));
790
+
791
+ /* 0x00000001 -- Ok for sqlite3_open_v2() */
792
+ rb_define_const(mC_Open, "READONLY", INT2FIX(SQLITE_OPEN_READONLY));
793
+
794
+ /* 0x00000002 -- Ok for sqlite3_open_v2() */
795
+ rb_define_const(mC_Open, "READWRITE", INT2FIX(SQLITE_OPEN_READWRITE));
796
+
797
+ /* 0x00020000 -- Ok for sqlite3_open_v2() */
798
+ rb_define_const(mC_Open, "SHAREDCACHE", INT2FIX(SQLITE_OPEN_SHAREDCACHE));
799
+
800
+ /* 0x00002000 -- VFS only */
801
+ rb_define_const(mC_Open, "SUBJOURNAL", INT2FIX(SQLITE_OPEN_SUBJOURNAL));
802
+
803
+ /* 0x00000200 -- VFS only */
804
+ rb_define_const(mC_Open, "TEMP_DB", INT2FIX(SQLITE_OPEN_TEMP_DB));
805
+
806
+ /* 0x00001000 -- VFS only */
807
+ rb_define_const(mC_Open, "TEMP_JOURNAL", INT2FIX(SQLITE_OPEN_TEMP_JOURNAL));
808
+
809
+ /* 0x00000400 -- VFS only */
810
+ rb_define_const(mC_Open, "TRANSIENT_DB", INT2FIX(SQLITE_OPEN_TRANSIENT_DB));
811
+
812
+ /* 0x00000040 -- Ok for sqlite3_open_v2() */
813
+ rb_define_const(mC_Open, "URI", INT2FIX(SQLITE_OPEN_URI));
814
+
815
+ /* 0x00080000 -- VFS only */
816
+ rb_define_const(mC_Open, "WAL", INT2FIX(SQLITE_OPEN_WAL));
817
+
818
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
819
+ rb_define_const(mC_Prepare, "PERSISTENT", INT2FIX(SQLITE_PREPARE_PERSISTENT));
820
+
821
+ /* 2 -- Object fully contained within query region */
822
+ rb_define_const(mC_RTree, "FULLY_WITHIN", INT2FIX(FULLY_WITHIN));
823
+
824
+ /* 0 -- Object completely outside of query region */
825
+ rb_define_const(mC_RTree, "NOT_WITHIN", INT2FIX(NOT_WITHIN));
826
+
827
+ /* 1 -- Object partially overlaps query region */
828
+ rb_define_const(mC_RTree, "PARTLY_WITHIN", INT2FIX(PARTLY_WITHIN));
829
+
830
+ /* 4 -- Callback routine requested an abort */
831
+ rb_define_const(mC_ResultCode, "ABORT", INT2FIX(SQLITE_ABORT));
832
+
833
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
834
+ rb_define_const(mC_ResultCode, "ABORT_ROLLBACK", INT2FIX(SQLITE_ABORT_ROLLBACK));
835
+
836
+ /* 23 -- Authorization denied */
837
+ rb_define_const(mC_ResultCode, "AUTH", INT2FIX(SQLITE_AUTH));
838
+
839
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
840
+ rb_define_const(mC_ResultCode, "AUTH_USER", INT2FIX(SQLITE_AUTH_USER));
841
+
842
+ /* 5 -- The database file is locked */
843
+ rb_define_const(mC_ResultCode, "BUSY", INT2FIX(SQLITE_BUSY));
844
+
845
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
846
+ rb_define_const(mC_ResultCode, "BUSY_RECOVERY", INT2FIX(SQLITE_BUSY_RECOVERY));
847
+
848
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
849
+ rb_define_const(mC_ResultCode, "BUSY_SNAPSHOT", INT2FIX(SQLITE_BUSY_SNAPSHOT));
850
+
851
+ /* 14 -- Unable to open the database file */
852
+ rb_define_const(mC_ResultCode, "CANTOPEN", INT2FIX(SQLITE_CANTOPEN));
853
+
854
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
855
+ rb_define_const(mC_ResultCode, "CANTOPEN_CONVPATH", INT2FIX(SQLITE_CANTOPEN_CONVPATH));
856
+
857
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
858
+ rb_define_const(mC_ResultCode, "CANTOPEN_FULLPATH", INT2FIX(SQLITE_CANTOPEN_FULLPATH));
859
+
860
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
861
+ rb_define_const(mC_ResultCode, "CANTOPEN_ISDIR", INT2FIX(SQLITE_CANTOPEN_ISDIR));
862
+
863
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
864
+ rb_define_const(mC_ResultCode, "CANTOPEN_NOTEMPDIR", INT2FIX(SQLITE_CANTOPEN_NOTEMPDIR));
865
+
866
+ /* 19 -- Abort due to constraint violation */
867
+ rb_define_const(mC_ResultCode, "CONSTRAINT", INT2FIX(SQLITE_CONSTRAINT));
868
+
869
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
870
+ rb_define_const(mC_ResultCode, "CONSTRAINT_CHECK", INT2FIX(SQLITE_CONSTRAINT_CHECK));
871
+
872
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
873
+ rb_define_const(mC_ResultCode, "CONSTRAINT_COMMITHOOK", INT2FIX(SQLITE_CONSTRAINT_COMMITHOOK));
874
+
875
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
876
+ rb_define_const(mC_ResultCode, "CONSTRAINT_FOREIGNKEY", INT2FIX(SQLITE_CONSTRAINT_FOREIGNKEY));
877
+
878
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
879
+ rb_define_const(mC_ResultCode, "CONSTRAINT_FUNCTION", INT2FIX(SQLITE_CONSTRAINT_FUNCTION));
880
+
881
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
882
+ rb_define_const(mC_ResultCode, "CONSTRAINT_NOTNULL", INT2FIX(SQLITE_CONSTRAINT_NOTNULL));
883
+
884
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
885
+ rb_define_const(mC_ResultCode, "CONSTRAINT_PRIMARYKEY", INT2FIX(SQLITE_CONSTRAINT_PRIMARYKEY));
886
+
887
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
888
+ rb_define_const(mC_ResultCode, "CONSTRAINT_ROWID", INT2FIX(SQLITE_CONSTRAINT_ROWID));
889
+
890
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
891
+ rb_define_const(mC_ResultCode, "CONSTRAINT_TRIGGER", INT2FIX(SQLITE_CONSTRAINT_TRIGGER));
892
+
893
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
894
+ rb_define_const(mC_ResultCode, "CONSTRAINT_UNIQUE", INT2FIX(SQLITE_CONSTRAINT_UNIQUE));
895
+
896
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
897
+ rb_define_const(mC_ResultCode, "CONSTRAINT_VTAB", INT2FIX(SQLITE_CONSTRAINT_VTAB));
898
+
899
+ /* 11 -- The database disk image is malformed */
900
+ rb_define_const(mC_ResultCode, "CORRUPT", INT2FIX(SQLITE_CORRUPT));
901
+
902
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
903
+ rb_define_const(mC_ResultCode, "CORRUPT_VTAB", INT2FIX(SQLITE_CORRUPT_VTAB));
904
+
905
+ /* 101 -- sqlite3_step() has finished executing */
906
+ rb_define_const(mC_ResultCode, "DONE", INT2FIX(SQLITE_DONE));
907
+
908
+ /* 16 -- Internal use only */
909
+ rb_define_const(mC_ResultCode, "EMPTY", INT2FIX(SQLITE_EMPTY));
910
+
911
+ /* 1 -- Generic error */
912
+ rb_define_const(mC_ResultCode, "ERROR", INT2FIX(SQLITE_ERROR));
913
+
914
+ /* 24 -- Not used */
915
+ rb_define_const(mC_ResultCode, "FORMAT", INT2FIX(SQLITE_FORMAT));
916
+
917
+ /* 13 -- Insertion failed because database is full */
918
+ rb_define_const(mC_ResultCode, "FULL", INT2FIX(SQLITE_FULL));
919
+
920
+ /* 2 -- Internal logic error in SQLite */
921
+ rb_define_const(mC_ResultCode, "INTERNAL", INT2FIX(SQLITE_INTERNAL));
922
+
923
+ /* 9 -- Operation terminated by sqlite3_interrupt() */
924
+ rb_define_const(mC_ResultCode, "INTERRUPT", INT2FIX(SQLITE_INTERRUPT));
925
+
926
+ /* 10 -- Some kind of disk I/O error occurred */
927
+ rb_define_const(mC_ResultCode, "IOERR", INT2FIX(SQLITE_IOERR));
928
+
929
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
930
+ rb_define_const(mC_ResultCode, "IOERR_ACCESS", INT2FIX(SQLITE_IOERR_ACCESS));
931
+
932
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
933
+ rb_define_const(mC_ResultCode, "IOERR_AUTH", INT2FIX(SQLITE_IOERR_AUTH));
934
+
935
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
936
+ rb_define_const(mC_ResultCode, "IOERR_BEGIN_ATOMIC", INT2FIX(SQLITE_IOERR_BEGIN_ATOMIC));
937
+
938
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
939
+ rb_define_const(mC_ResultCode, "IOERR_BLOCKED", INT2FIX(SQLITE_IOERR_BLOCKED));
940
+
941
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
942
+ rb_define_const(mC_ResultCode, "IOERR_CHECKRESERVEDLOCK", INT2FIX(SQLITE_IOERR_CHECKRESERVEDLOCK));
943
+
944
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
945
+ rb_define_const(mC_ResultCode, "IOERR_CLOSE", INT2FIX(SQLITE_IOERR_CLOSE));
946
+
947
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
948
+ rb_define_const(mC_ResultCode, "IOERR_COMMIT_ATOMIC", INT2FIX(SQLITE_IOERR_COMMIT_ATOMIC));
949
+
950
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
951
+ rb_define_const(mC_ResultCode, "IOERR_CONVPATH", INT2FIX(SQLITE_IOERR_CONVPATH));
952
+
953
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
954
+ rb_define_const(mC_ResultCode, "IOERR_DELETE", INT2FIX(SQLITE_IOERR_DELETE));
955
+
956
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
957
+ rb_define_const(mC_ResultCode, "IOERR_DELETE_NOENT", INT2FIX(SQLITE_IOERR_DELETE_NOENT));
958
+
959
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
960
+ rb_define_const(mC_ResultCode, "IOERR_DIR_CLOSE", INT2FIX(SQLITE_IOERR_DIR_CLOSE));
961
+
962
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
963
+ rb_define_const(mC_ResultCode, "IOERR_DIR_FSYNC", INT2FIX(SQLITE_IOERR_DIR_FSYNC));
964
+
965
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
966
+ rb_define_const(mC_ResultCode, "IOERR_FSTAT", INT2FIX(SQLITE_IOERR_FSTAT));
967
+
968
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
969
+ rb_define_const(mC_ResultCode, "IOERR_FSYNC", INT2FIX(SQLITE_IOERR_FSYNC));
970
+
971
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
972
+ rb_define_const(mC_ResultCode, "IOERR_GETTEMPPATH", INT2FIX(SQLITE_IOERR_GETTEMPPATH));
973
+
974
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
975
+ rb_define_const(mC_ResultCode, "IOERR_LOCK", INT2FIX(SQLITE_IOERR_LOCK));
976
+
977
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
978
+ rb_define_const(mC_ResultCode, "IOERR_MMAP", INT2FIX(SQLITE_IOERR_MMAP));
979
+
980
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
981
+ rb_define_const(mC_ResultCode, "IOERR_NOMEM", INT2FIX(SQLITE_IOERR_NOMEM));
982
+
983
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
984
+ rb_define_const(mC_ResultCode, "IOERR_RDLOCK", INT2FIX(SQLITE_IOERR_RDLOCK));
985
+
986
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
987
+ rb_define_const(mC_ResultCode, "IOERR_READ", INT2FIX(SQLITE_IOERR_READ));
988
+
989
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
990
+ rb_define_const(mC_ResultCode, "IOERR_ROLLBACK_ATOMIC", INT2FIX(SQLITE_IOERR_ROLLBACK_ATOMIC));
991
+
992
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
993
+ rb_define_const(mC_ResultCode, "IOERR_SEEK", INT2FIX(SQLITE_IOERR_SEEK));
994
+
995
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
996
+ rb_define_const(mC_ResultCode, "IOERR_SHMLOCK", INT2FIX(SQLITE_IOERR_SHMLOCK));
997
+
998
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
999
+ rb_define_const(mC_ResultCode, "IOERR_SHMMAP", INT2FIX(SQLITE_IOERR_SHMMAP));
1000
+
1001
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1002
+ rb_define_const(mC_ResultCode, "IOERR_SHMOPEN", INT2FIX(SQLITE_IOERR_SHMOPEN));
1003
+
1004
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1005
+ rb_define_const(mC_ResultCode, "IOERR_SHMSIZE", INT2FIX(SQLITE_IOERR_SHMSIZE));
1006
+
1007
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1008
+ rb_define_const(mC_ResultCode, "IOERR_SHORT_READ", INT2FIX(SQLITE_IOERR_SHORT_READ));
1009
+
1010
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1011
+ rb_define_const(mC_ResultCode, "IOERR_TRUNCATE", INT2FIX(SQLITE_IOERR_TRUNCATE));
1012
+
1013
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1014
+ rb_define_const(mC_ResultCode, "IOERR_UNLOCK", INT2FIX(SQLITE_IOERR_UNLOCK));
1015
+
1016
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1017
+ rb_define_const(mC_ResultCode, "IOERR_VNODE", INT2FIX(SQLITE_IOERR_VNODE));
1018
+
1019
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1020
+ rb_define_const(mC_ResultCode, "IOERR_WRITE", INT2FIX(SQLITE_IOERR_WRITE));
1021
+
1022
+ /* 6 -- A table in the database is locked */
1023
+ rb_define_const(mC_ResultCode, "LOCKED", INT2FIX(SQLITE_LOCKED));
1024
+
1025
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1026
+ rb_define_const(mC_ResultCode, "LOCKED_SHAREDCACHE", INT2FIX(SQLITE_LOCKED_SHAREDCACHE));
1027
+
1028
+ /* 20 -- Data type mismatch */
1029
+ rb_define_const(mC_ResultCode, "MISMATCH", INT2FIX(SQLITE_MISMATCH));
1030
+
1031
+ /* 21 -- Library used incorrectly */
1032
+ rb_define_const(mC_ResultCode, "MISUSE", INT2FIX(SQLITE_MISUSE));
1033
+
1034
+ /* 22 -- Uses OS features not supported on host */
1035
+ rb_define_const(mC_ResultCode, "NOLFS", INT2FIX(SQLITE_NOLFS));
1036
+
1037
+ /* 7 -- A malloc() failed */
1038
+ rb_define_const(mC_ResultCode, "NOMEM", INT2FIX(SQLITE_NOMEM));
1039
+
1040
+ /* 26 -- File opened that is not a database file */
1041
+ rb_define_const(mC_ResultCode, "NOTADB", INT2FIX(SQLITE_NOTADB));
1042
+
1043
+ /* 12 -- Unknown opcode in sqlite3_file_control() */
1044
+ rb_define_const(mC_ResultCode, "NOTFOUND", INT2FIX(SQLITE_NOTFOUND));
1045
+
1046
+ /* 27 -- Notifications from sqlite3_log() */
1047
+ rb_define_const(mC_ResultCode, "NOTICE", INT2FIX(SQLITE_NOTICE));
1048
+
1049
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1050
+ rb_define_const(mC_ResultCode, "NOTICE_RECOVER_ROLLBACK", INT2FIX(SQLITE_NOTICE_RECOVER_ROLLBACK));
1051
+
1052
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1053
+ rb_define_const(mC_ResultCode, "NOTICE_RECOVER_WAL", INT2FIX(SQLITE_NOTICE_RECOVER_WAL));
1054
+
1055
+ /* 0 -- Successful result */
1056
+ rb_define_const(mC_ResultCode, "OK", INT2FIX(SQLITE_OK));
1057
+
1058
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1059
+ rb_define_const(mC_ResultCode, "OK_LOAD_PERMANENTLY", INT2FIX(SQLITE_OK_LOAD_PERMANENTLY));
1060
+
1061
+ /* 3 -- Access permission denied */
1062
+ rb_define_const(mC_ResultCode, "PERM", INT2FIX(SQLITE_PERM));
1063
+
1064
+ /* 15 -- Database lock protocol error */
1065
+ rb_define_const(mC_ResultCode, "PROTOCOL", INT2FIX(SQLITE_PROTOCOL));
1066
+
1067
+ /* 25 -- 2nd parameter to sqlite3_bind out of range */
1068
+ rb_define_const(mC_ResultCode, "RANGE", INT2FIX(SQLITE_RANGE));
1069
+
1070
+ /* 8 -- Attempt to write a readonly database */
1071
+ rb_define_const(mC_ResultCode, "READONLY", INT2FIX(SQLITE_READONLY));
1072
+
1073
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1074
+ rb_define_const(mC_ResultCode, "READONLY_CANTLOCK", INT2FIX(SQLITE_READONLY_CANTLOCK));
1075
+
1076
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1077
+ rb_define_const(mC_ResultCode, "READONLY_DBMOVED", INT2FIX(SQLITE_READONLY_DBMOVED));
1078
+
1079
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1080
+ rb_define_const(mC_ResultCode, "READONLY_RECOVERY", INT2FIX(SQLITE_READONLY_RECOVERY));
1081
+
1082
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1083
+ rb_define_const(mC_ResultCode, "READONLY_ROLLBACK", INT2FIX(SQLITE_READONLY_ROLLBACK));
1084
+
1085
+ /* 100 -- sqlite3_step() has another row ready */
1086
+ rb_define_const(mC_ResultCode, "ROW", INT2FIX(SQLITE_ROW));
1087
+
1088
+ /* 17 -- The database schema changed */
1089
+ rb_define_const(mC_ResultCode, "SCHEMA", INT2FIX(SQLITE_SCHEMA));
1090
+
1091
+ /* 18 -- String or BLOB exceeds size limit */
1092
+ rb_define_const(mC_ResultCode, "TOOBIG", INT2FIX(SQLITE_TOOBIG));
1093
+
1094
+ /* 28 -- Warnings from sqlite3_log() */
1095
+ rb_define_const(mC_ResultCode, "WARNING", INT2FIX(SQLITE_WARNING));
1096
+
1097
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1098
+ rb_define_const(mC_ResultCode, "WARNING_AUTOINDEX", INT2FIX(SQLITE_WARNING_AUTOINDEX));
1099
+
1100
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1101
+ rb_define_const(mC_SHM, "EXCLUSIVE", INT2FIX(SQLITE_SHM_EXCLUSIVE));
1102
+
1103
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1104
+ rb_define_const(mC_SHM, "LOCK", INT2FIX(SQLITE_SHM_LOCK));
1105
+
1106
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1107
+ rb_define_const(mC_SHM, "NLOCK", INT2FIX(SQLITE_SHM_NLOCK));
1108
+
1109
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1110
+ rb_define_const(mC_SHM, "SHARED", INT2FIX(SQLITE_SHM_SHARED));
1111
+
1112
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1113
+ rb_define_const(mC_SHM, "UNLOCK", INT2FIX(SQLITE_SHM_UNLOCK));
1114
+
1115
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1116
+ rb_define_const(mC_ScanStat, "EST", INT2FIX(SQLITE_SCANSTAT_EST));
1117
+
1118
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1119
+ rb_define_const(mC_ScanStat, "EXPLAIN", INT2FIX(SQLITE_SCANSTAT_EXPLAIN));
1120
+
1121
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1122
+ rb_define_const(mC_ScanStat, "NAME", INT2FIX(SQLITE_SCANSTAT_NAME));
1123
+
1124
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1125
+ rb_define_const(mC_ScanStat, "NLOOP", INT2FIX(SQLITE_SCANSTAT_NLOOP));
1126
+
1127
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1128
+ rb_define_const(mC_ScanStat, "NVISIT", INT2FIX(SQLITE_SCANSTAT_NVISIT));
1129
+
1130
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1131
+ rb_define_const(mC_ScanStat, "SELECTID", INT2FIX(SQLITE_SCANSTAT_SELECTID));
1132
+
1133
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1134
+ rb_define_const(mC_StatementStatus, "AUTOINDEX", INT2FIX(SQLITE_STMTSTATUS_AUTOINDEX));
1135
+
1136
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1137
+ rb_define_const(mC_StatementStatus, "FULLSCAN_STEP", INT2FIX(SQLITE_STMTSTATUS_FULLSCAN_STEP));
1138
+
1139
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1140
+ rb_define_const(mC_StatementStatus, "MEMUSED", INT2FIX(SQLITE_STMTSTATUS_MEMUSED));
1141
+
1142
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1143
+ rb_define_const(mC_StatementStatus, "REPREPARE", INT2FIX(SQLITE_STMTSTATUS_REPREPARE));
1144
+
1145
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1146
+ rb_define_const(mC_StatementStatus, "RUN", INT2FIX(SQLITE_STMTSTATUS_RUN));
1147
+
1148
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1149
+ rb_define_const(mC_StatementStatus, "SORT", INT2FIX(SQLITE_STMTSTATUS_SORT));
1150
+
1151
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1152
+ rb_define_const(mC_StatementStatus, "VM_STEP", INT2FIX(SQLITE_STMTSTATUS_VM_STEP));
1153
+
1154
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1155
+ rb_define_const(mC_Status, "MALLOC_COUNT", INT2FIX(SQLITE_STATUS_MALLOC_COUNT));
1156
+
1157
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1158
+ rb_define_const(mC_Status, "MALLOC_SIZE", INT2FIX(SQLITE_STATUS_MALLOC_SIZE));
1159
+
1160
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1161
+ rb_define_const(mC_Status, "MEMORY_USED", INT2FIX(SQLITE_STATUS_MEMORY_USED));
1162
+
1163
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1164
+ rb_define_const(mC_Status, "PAGECACHE_OVERFLOW", INT2FIX(SQLITE_STATUS_PAGECACHE_OVERFLOW));
1165
+
1166
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1167
+ rb_define_const(mC_Status, "PAGECACHE_SIZE", INT2FIX(SQLITE_STATUS_PAGECACHE_SIZE));
1168
+
1169
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1170
+ rb_define_const(mC_Status, "PAGECACHE_USED", INT2FIX(SQLITE_STATUS_PAGECACHE_USED));
1171
+
1172
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1173
+ rb_define_const(mC_Status, "PARSER_STACK", INT2FIX(SQLITE_STATUS_PARSER_STACK));
1174
+
1175
+ /* 4 -- NOT USED */
1176
+ rb_define_const(mC_Status, "SCRATCH_OVERFLOW", INT2FIX(SQLITE_STATUS_SCRATCH_OVERFLOW));
1177
+
1178
+ /* 8 -- NOT USED */
1179
+ rb_define_const(mC_Status, "SCRATCH_SIZE", INT2FIX(SQLITE_STATUS_SCRATCH_SIZE));
1180
+
1181
+ /* 3 -- NOT USED */
1182
+ rb_define_const(mC_Status, "SCRATCH_USED", INT2FIX(SQLITE_STATUS_SCRATCH_USED));
1183
+
1184
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1185
+ rb_define_const(mC_Sync, "DATAONLY", INT2FIX(SQLITE_SYNC_DATAONLY));
1186
+
1187
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1188
+ rb_define_const(mC_Sync, "FULL", INT2FIX(SQLITE_SYNC_FULL));
1189
+
1190
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1191
+ rb_define_const(mC_Sync, "NORMAL", INT2FIX(SQLITE_SYNC_NORMAL));
1192
+
1193
+ /* 5 -- Deprecated */
1194
+ rb_define_const(mC_TextEncoding, "ANY", INT2FIX(SQLITE_ANY));
1195
+
1196
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1197
+ rb_define_const(mC_TextEncoding, "DETERMINISTIC", INT2FIX(SQLITE_DETERMINISTIC));
1198
+
1199
+ /* 4 -- Use native byte order */
1200
+ rb_define_const(mC_TextEncoding, "UTF16", INT2FIX(SQLITE_UTF16));
1201
+
1202
+ /* 3 -- IMP: R-51971-34154 */
1203
+ rb_define_const(mC_TextEncoding, "UTF16BE", INT2FIX(SQLITE_UTF16BE));
1204
+
1205
+ /* 2 -- IMP: R-03371-37637 */
1206
+ rb_define_const(mC_TextEncoding, "UTF16LE", INT2FIX(SQLITE_UTF16LE));
1207
+
1208
+ /* 8 -- sqlite3_create_collation only */
1209
+ rb_define_const(mC_TextEncoding, "UTF16_ALIGNED", INT2FIX(SQLITE_UTF16_ALIGNED));
1210
+
1211
+ /* 1 -- IMP: R-37514-35566 */
1212
+ rb_define_const(mC_TextEncoding, "UTF8", INT2FIX(SQLITE_UTF8));
1213
+
1214
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1215
+ rb_define_const(mC_Trace, "CLOSE", INT2FIX(SQLITE_TRACE_CLOSE));
1216
+
1217
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1218
+ rb_define_const(mC_Trace, "PROFILE", INT2FIX(SQLITE_TRACE_PROFILE));
1219
+
1220
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1221
+ rb_define_const(mC_Trace, "ROW", INT2FIX(SQLITE_TRACE_ROW));
1222
+
1223
+ /* no meaningful autogenerated documentation -- constant is self explanatory ?*/
1224
+ rb_define_const(mC_Trace, "STMT", INT2FIX(SQLITE_TRACE_STMT));
1225
+
1226
+ }