sqlite3-ruby 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/doc/faq/faq.html CHANGED
@@ -62,25 +62,25 @@
62
62
  <ul>
63
63
  <li>How do I do a database query?
64
64
  <ul>
65
- <li><a href='#9144150'>I just want an array of the rows&#8230;</a></li>
66
- <li><a href='#9144080'>I&#8217;d like to use a block to iterate through the rows&#8230;</a></li>
67
- <li><a href='#9144010'>I need to get the column names as well as the rows&#8230;</a></li>
68
- <li><a href='#9143940'>I just want the first row of the result set&#8230;</a></li>
69
- <li><a href='#9143870'>I just want the first value of the first row of the result set&#8230;</a></li>
65
+ <li><a href='#9126850'>I just want an array of the rows&#8230;</a></li>
66
+ <li><a href='#9126780'>I&#8217;d like to use a block to iterate through the rows&#8230;</a></li>
67
+ <li><a href='#9126710'>I need to get the column names as well as the rows&#8230;</a></li>
68
+ <li><a href='#9126640'>I just want the first row of the result set&#8230;</a></li>
69
+ <li><a href='#9126570'>I just want the first value of the first row of the result set&#8230;</a></li>
70
70
  </ul>
71
71
  </li>
72
- <li><a href='#9143750'>How do I prepare a statement for repeated execution?</a></li>
73
- <li><a href='#9143680'>How do I use placeholders in an <span class="caps">SQL</span> statement?</a></li>
74
- <li><a href='#9143610'>How do I discover metadata about a query?</a></li>
75
- <li><a href='#9143540'>I&#8217;d like the rows to be indexible by column name.</a></li>
76
- <li><a href='#9143470'>I&#8217;d like the values from a query to be the correct types, instead of String.</a></li>
77
- <li><a href='#9143400'>How do insert binary data into the database?</a></li>
78
- <li><a href='#9143330'>How do I do a <span class="caps">DDL</span> (insert, update, delete) statement?</a></li>
79
- <li><a href='#9143260'>How do I execute multiple statements in a single string?</a></li>
80
- <li><a href='#9143190'>How do I begin/end a transaction?</a></li>
72
+ <li><a href='#9126450'>How do I prepare a statement for repeated execution?</a></li>
73
+ <li><a href='#9126380'>How do I use placeholders in an <span class="caps">SQL</span> statement?</a></li>
74
+ <li><a href='#9126310'>How do I discover metadata about a query?</a></li>
75
+ <li><a href='#9126240'>I&#8217;d like the rows to be indexible by column name.</a></li>
76
+ <li><a href='#9126170'>I&#8217;d like the values from a query to be the correct types, instead of String.</a></li>
77
+ <li><a href='#9126100'>How do insert binary data into the database?</a></li>
78
+ <li><a href='#9126030'>How do I do a <span class="caps">DDL</span> (insert, update, delete) statement?</a></li>
79
+ <li><a href='#9125960'>How do I execute multiple statements in a single string?</a></li>
80
+ <li><a href='#9125890'>How do I begin/end a transaction?</a></li>
81
81
  </ul>
82
82
  </div>
83
- <a name='9144150'></a>
83
+ <a name='9126850'></a>
84
84
  <div class='faq-title'>How do I do a database query? I just want an array of the rows&#8230;</div>
85
85
  <div class='faq-answer'><p>Use the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a> method. If you don&#8217;t give it a block, it will return an array of all the rows:</p>
86
86
 
@@ -91,7 +91,7 @@
91
91
  db = SQLite3::<a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database</a>.new( "test.db" )
92
92
  rows = db.execute( "select * from test" )
93
93
  </pre></div>
94
- <a name='9144080'></a>
94
+ <a name='9126780'></a>
95
95
  <div class='faq-title'>How do I do a database query? I&#8217;d like to use a block to iterate through the rows&#8230;</div>
96
96
  <div class='faq-answer'><p>Use the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a> method. If you give it a block, each row of the result will be yielded to the block:</p>
97
97
 
@@ -104,7 +104,7 @@
104
104
  ...
105
105
  end
106
106
  </pre></div>
107
- <a name='9144010'></a>
107
+ <a name='9126710'></a>
108
108
  <div class='faq-title'>How do I do a database query? I need to get the column names as well as the rows&#8230;</div>
109
109
  <div class='faq-answer'><p>Use the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute2</a> method. This works just like <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a>; if you don&#8217;t give it a block, it returns an array of rows; otherwise, it will yield each row to the block. <em>However</em>, the first row returned is always an array of the column names from the query:</p>
110
110
 
@@ -126,7 +126,7 @@
126
126
  end
127
127
  end
128
128
  </pre></div>
129
- <a name='9143940'></a>
129
+ <a name='9126640'></a>
130
130
  <div class='faq-title'>How do I do a database query? I just want the first row of the result set&#8230;</div>
131
131
  <div class='faq-answer'><p>Easy. Just call <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#get_first_row</a>:</p>
132
132
 
@@ -136,7 +136,7 @@
136
136
  </pre>
137
137
 
138
138
  <p>This also supports bind variables, just like <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a> and friends.</p></div>
139
- <a name='9143870'></a>
139
+ <a name='9126570'></a>
140
140
  <div class='faq-title'>How do I do a database query? I just want the first value of the first row of the result set&#8230;</div>
141
141
  <div class='faq-answer'><p>Also easy. Just call <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#get_first_value</a>:</p>
142
142
 
@@ -146,7 +146,7 @@
146
146
  </pre>
147
147
 
148
148
  <p>This also supports bind variables, just like <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a> and friends.</p></div>
149
- <a name='9143750'></a>
149
+ <a name='9126450'></a>
150
150
  <div class='faq-title'>How do I prepare a statement for repeated execution?</div>
151
151
  <div class='faq-answer'><p>If the same statement is going to be executed repeatedly, you can speed things up a bit by <em>preparing</em> the statement. You do this via the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#prepare</a> method. It returns a <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Statement.html'>Statement</a> object, and you can then invoke #execute on that to get the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/ResultSet.html'>ResultSet</a>:</p>
152
152
 
@@ -174,7 +174,7 @@
174
174
  </pre>
175
175
 
176
176
  <p>This is made more useful by the ability to bind variables to placeholders via the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Statement.html'>Statement#bind_param</a> and <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Statement.html'>Statement#bind_params</a> methods. (See the next <span class="caps">FAQ</span> for details.)</p></div>
177
- <a name='9143680'></a>
177
+ <a name='9126380'></a>
178
178
  <div class='faq-title'>How do I use placeholders in an <span class="caps">SQL</span> statement?</div>
179
179
  <div class='faq-answer'><p>Placeholders in an <span class="caps">SQL</span> statement take any of the following formats:</p>
180
180
 
@@ -249,7 +249,7 @@
249
249
 
250
250
  stmt.bind_params( "value", "name" =&gt; "bob" )
251
251
  </pre></div>
252
- <a name='9143610'></a>
252
+ <a name='9126310'></a>
253
253
  <div class='faq-title'>How do I discover metadata about a query?</div>
254
254
  <div class='faq-answer'><p>If you ever want to know the names or types of the columns in a result set, you can do it in several ways.</p>
255
255
 
@@ -282,7 +282,7 @@
282
282
  p stmt.columns
283
283
  p stmt.types
284
284
  </pre></div>
285
- <a name='9143540'></a>
285
+ <a name='9126240'></a>
286
286
  <div class='faq-title'>I&#8217;d like the rows to be indexible by column name.</div>
287
287
  <div class='faq-answer'><p>By default, each row from a query is returned as an Array of values. This means that you can only obtain values by their index. Sometimes, however, you would like to obtain values by their column name.</p>
288
288
 
@@ -310,7 +310,7 @@
310
310
  p row[1] == row['column2']
311
311
  end
312
312
  </pre></div>
313
- <a name='9143470'></a>
313
+ <a name='9126170'></a>
314
314
  <div class='faq-title'>I&#8217;d like the values from a query to be the correct types, instead of String.</div>
315
315
  <div class='faq-answer'><p>You can turn on &#8220;type translation&#8221; by setting <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#type_translation</a> to true:</p>
316
316
 
@@ -348,7 +348,7 @@
348
348
  obj = db.get_first_value( "select thing from objects where name='bob'" )
349
349
  p obj == h
350
350
  </pre></div>
351
- <a name='9143400'></a>
351
+ <a name='9126100'></a>
352
352
  <div class='faq-title'>How do insert binary data into the database?</div>
353
353
  <div class='faq-answer'><p>Use blobs. Blobs are new features of SQLite3. You have to use bind variables to make it work:</p>
354
354
 
@@ -360,7 +360,7 @@
360
360
  </pre>
361
361
 
362
362
  <p>The blob values must be indicated explicitly by binding each parameter to a value of type SQLite3::Blob.</p></div>
363
- <a name='9143330'></a>
363
+ <a name='9126030'></a>
364
364
  <div class='faq-title'>How do I do a <span class="caps">DDL</span> (insert, update, delete) statement?</div>
365
365
  <div class='faq-answer'><p>You can actually do inserts, updates, and deletes in exactly the same way as selects, but in general the <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a> method will be most convenient:</p>
366
366
 
@@ -368,7 +368,7 @@
368
368
  <pre>
369
369
  db.execute( "insert into table values ( ?, ? )", *bind_vars )
370
370
  </pre></div>
371
- <a name='9143260'></a>
371
+ <a name='9125960'></a>
372
372
  <div class='faq-title'>How do I execute multiple statements in a single string?</div>
373
373
  <div class='faq-answer'><p>The standard query methods (<a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute</a>, <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute2</a>, <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#query</a>, and <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Statement.html'>Statement#execute</a>) will only execute the first statement in the string that is given to them. Thus, if you have a string with multiple <span class="caps">SQL</span> statements, each separated by a string, you can&#8217;t use those methods to execute them all at once.</p>
374
374
 
@@ -392,7 +392,7 @@
392
392
  </pre>
393
393
 
394
394
  <p>Unlike the other query methods, <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#execute_batch</a> accepts no block. It will also only ever return <ins>nil</ins>. Thus, it is really only suitable for batch processing of <span class="caps">DDL</span> statements.</p></div>
395
- <a name='9143190'></a>
395
+ <a name='9125890'></a>
396
396
  <div class='faq-title'>How do I begin/end a transaction?</div>
397
397
  <div class='faq-answer'><p>Use <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#transaction</a> to start a transaction. If you give it a block, the block will be automatically committed at the end of the block, unless an exception was raised, in which case the transaction will be rolled back. (Never explicitly call <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#commit</a> or <a href='http://sqlite-ruby.rubyforge.org/classes/SQLite/Database.html'>Database#rollback</a> inside of a transaction block&#8212;you&#8217;ll get errors when the block terminates!)</p>
398
398
 
@@ -0,0 +1,146 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = /opt/local/lib/ruby/1.8/i686-darwin9.2.2
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ prefix = $(DESTDIR)/opt/local
11
+ exec_prefix = $(prefix)
12
+ sitedir = $(prefix)/lib/ruby/site_ruby
13
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
14
+ archdir = $(rubylibdir)/$(arch)
15
+ sbindir = $(exec_prefix)/sbin
16
+ vendordir = $(prefix)/lib/ruby/vendor_ruby
17
+ datadir = $(prefix)/share
18
+ includedir = $(prefix)/include
19
+ infodir = $(prefix)/info
20
+ sysconfdir = $(prefix)/etc
21
+ mandir = $(DESTDIR)/opt/local/share/man
22
+ libdir = $(exec_prefix)/lib
23
+ sharedstatedir = $(prefix)/com
24
+ oldincludedir = $(DESTDIR)/usr/include
25
+ sitearchdir = $(sitelibdir)/$(sitearch)
26
+ vendorarchdir = $(vendorlibdir)/$(vendorarch)
27
+ bindir = $(exec_prefix)/bin
28
+ localstatedir = $(prefix)/var
29
+ vendorlibdir = $(vendordir)/$(ruby_version)
30
+ sitelibdir = $(sitedir)/$(ruby_version)
31
+ libexecdir = $(exec_prefix)/libexec
32
+
33
+ CC = gcc
34
+ LIBRUBY = $(LIBRUBY_SO)
35
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
36
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
37
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
38
+
39
+ RUBY_EXTCONF_H =
40
+ CFLAGS = -fno-common -O2 -fno-common -pipe -fno-common
41
+ INCFLAGS = -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I.
42
+ CPPFLAGS = -DHAVE_SQLITE3_H -I/usr/local/include -I/opt/local/include
43
+ CXXFLAGS = $(CFLAGS)
44
+ DLDFLAGS = -L. -L/opt/local/lib
45
+ LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
46
+ AR = ar
47
+ EXEEXT =
48
+
49
+ RUBY_INSTALL_NAME = ruby
50
+ RUBY_SO_NAME = ruby
51
+ arch = i686-darwin9.2.2
52
+ sitearch = i686-darwin9.2.2
53
+ vendorarch = i686-darwin9.2.2
54
+ ruby_version = 1.8
55
+ ruby = /opt/local/bin/ruby
56
+ RUBY = $(ruby)
57
+ RM = rm -f
58
+ MAKEDIRS = mkdir -p
59
+ INSTALL = /usr/bin/install -c
60
+ INSTALL_PROG = $(INSTALL) -m 0755
61
+ INSTALL_DATA = $(INSTALL) -m 644
62
+ COPY = cp
63
+
64
+ #### End of system configuration section. ####
65
+
66
+ preload =
67
+
68
+ libpath = . $(libdir) /usr/local/lib
69
+ LIBPATH = -L"." -L"$(libdir)" -L"/usr/local/lib"
70
+ DEFFILE =
71
+
72
+ CLEANFILES = mkmf.log
73
+ DISTCLEANFILES =
74
+
75
+ extout =
76
+ extout_prefix =
77
+ target_prefix =
78
+ LOCAL_LIBS =
79
+ LIBS = $(LIBRUBYARG_SHARED) -lsqlite3 -lpthread -ldl -lobjc
80
+ SRCS = sqlite3_api_wrap.c
81
+ OBJS = sqlite3_api_wrap.o
82
+ TARGET = sqlite3_api
83
+ DLLIB = $(TARGET).bundle
84
+ EXTSTATIC =
85
+ STATIC_LIB =
86
+
87
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
88
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
89
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
90
+
91
+ TARGET_SO = $(DLLIB)
92
+ CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
93
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
94
+
95
+ all: $(DLLIB)
96
+ static: $(STATIC_LIB)
97
+
98
+ clean:
99
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
100
+
101
+ distclean: clean
102
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
103
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
104
+
105
+ realclean: distclean
106
+ install: install-so install-rb
107
+
108
+ install-so: $(RUBYARCHDIR)
109
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
110
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
111
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
112
+ install-rb: pre-install-rb install-rb-default
113
+ install-rb-default: pre-install-rb-default
114
+ pre-install-rb: Makefile
115
+ pre-install-rb-default: Makefile
116
+ $(RUBYARCHDIR):
117
+ $(MAKEDIRS) $@
118
+
119
+ site-install: site-install-so site-install-rb
120
+ site-install-so: install-so
121
+ site-install-rb: install-rb
122
+
123
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
124
+
125
+ .cc.o:
126
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
127
+
128
+ .cxx.o:
129
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
130
+
131
+ .cpp.o:
132
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
133
+
134
+ .C.o:
135
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
136
+
137
+ .c.o:
138
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
139
+
140
+ $(DLLIB): $(OBJS)
141
+ @-$(RM) $@
142
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
143
+
144
+
145
+
146
+ $(OBJS): ruby.h defines.h
@@ -0,0 +1,71 @@
1
+ have_library: checking for fdatasync() in -lrt... -------------------- no
2
+
3
+ "gcc -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -L/opt/local/lib -lruby-static -lrt -lpthread -ldl -lobjc "
4
+ conftest.c: In function ‘t’:
5
+ conftest.c:3: error: ‘fdatasync’ undeclared (first use in this function)
6
+ conftest.c:3: error: (Each undeclared identifier is reported only once
7
+ conftest.c:3: error: for each function it appears in.)
8
+ checked program was:
9
+ /* begin */
10
+ 1: /*top*/
11
+ 2: int main() { return 0; }
12
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))fdatasync; return 0; }
13
+ /* end */
14
+
15
+ "gcc -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -L/opt/local/lib -lruby-static -lrt -lpthread -ldl -lobjc "
16
+ ld: library not found for -lrt
17
+ collect2: ld returned 1 exit status
18
+ checked program was:
19
+ /* begin */
20
+ 1: /*top*/
21
+ 2: int main() { return 0; }
22
+ 3: int t() { fdatasync(); return 0; }
23
+ /* end */
24
+
25
+ "gcc -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -L/opt/local/lib -lruby-static -lrt -lpthread -ldl -lobjc "
26
+ ld: library not found for -lrt
27
+ collect2: ld returned 1 exit status
28
+ checked program was:
29
+ /* begin */
30
+ 1: int fdatasync();
31
+ 2: /*top*/
32
+ 3: int main() { return 0; }
33
+ 4: int t() { fdatasync(); return 0; }
34
+ /* end */
35
+
36
+ --------------------
37
+
38
+ have_header: checking for sqlite3.h... -------------------- yes
39
+
40
+ "gcc -E -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -o conftest.i"
41
+ checked program was:
42
+ /* begin */
43
+ 1: #include <sqlite3.h>
44
+ /* end */
45
+
46
+ --------------------
47
+
48
+ have_library: checking for sqlite3_open() in -lsqlite3... -------------------- yes
49
+
50
+ "gcc -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -L/opt/local/lib -lruby-static -lsqlite3 -lpthread -ldl -lobjc "
51
+ conftest.c: In function ‘t’:
52
+ conftest.c:3: error: ‘sqlite3_open’ undeclared (first use in this function)
53
+ conftest.c:3: error: (Each undeclared identifier is reported only once
54
+ conftest.c:3: error: for each function it appears in.)
55
+ checked program was:
56
+ /* begin */
57
+ 1: /*top*/
58
+ 2: int main() { return 0; }
59
+ 3: int t() { void ((*volatile p)()); p = (void ((*)()))sqlite3_open; return 0; }
60
+ /* end */
61
+
62
+ "gcc -o conftest -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.2.2 -I. -I/usr/local/include -I/opt/local/include -O2 -fno-common -pipe -fno-common conftest.c -L"." -L"/opt/local/lib" -L"/usr/local/lib" -L. -L/opt/local/lib -lruby-static -lsqlite3 -lpthread -ldl -lobjc "
63
+ checked program was:
64
+ /* begin */
65
+ 1: /*top*/
66
+ 2: int main() { return 0; }
67
+ 3: int t() { sqlite3_open(); return 0; }
68
+ /* end */
69
+
70
+ --------------------
71
+
@@ -1064,6 +1064,14 @@ extern "C" {
1064
1064
  #include <sqlite3.h>
1065
1065
  #include "ruby.h"
1066
1066
 
1067
+ #ifndef RSTRING_PTR
1068
+ #define RSTRING_PTR(s) (RSTRING(s)->ptr)
1069
+ #endif
1070
+
1071
+ #ifndef RSTRING_LEN
1072
+ #define RSTRING_LEN(s) (RSTRING(s)->len)
1073
+ #endif
1074
+
1067
1075
  #define Init_API Init_sqlite3_api
1068
1076
 
1069
1077
  struct CallbackData {
@@ -4,7 +4,7 @@ module SQLite3
4
4
 
5
5
  MAJOR = 1
6
6
  MINOR = 2
7
- TINY = 3
7
+ TINY = 4
8
8
 
9
9
  STRING = [ MAJOR, MINOR, TINY ].join( "." )
10
10
  #:beta-tag:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-26 00:00:00 -06:00
12
+ date: 2008-08-27 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,7 +28,9 @@ files:
28
28
  - doc/faq/faq.yml
29
29
  - ext/sqlite3_api
30
30
  - ext/sqlite3_api/extconf.rb
31
+ - ext/sqlite3_api/Makefile
31
32
  - ext/sqlite3_api/MANIFEST
33
+ - ext/sqlite3_api/mkmf.log
32
34
  - ext/sqlite3_api/sqlite3_api.i
33
35
  - ext/sqlite3_api/sqlite3_api_wrap.c
34
36
  - ext/sqlite3_api/win32