From 36ff0b85ed9049a63cc3b66533282e730a7db398 Mon Sep 17 00:00:00 2001 From: Rob Holland Date: Sat, 17 May 2008 10:31:56 +0100 Subject: amend rdoc to make it clear to use Statement#execute to execute a prepared statement --- ext/sqlite3_api/sqlite3_api.i | 5 +++++ lib/sqlite3/database.rb | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ext/sqlite3_api/sqlite3_api.i b/ext/sqlite3_api/sqlite3_api.i index 0cf74f4..7c6cee6 100644 --- a/ext/sqlite3_api/sqlite3_api.i +++ b/ext/sqlite3_api/sqlite3_api.i @@ -2,7 +2,12 @@ %include "typemaps.i" %{ #include +#include "version.h" +#if RUBY_VERSION_CODE < 190 #include "ruby.h" +#else +#include "ruby/intern.h" +#endif #define Init_API Init_sqlite3_api diff --git a/lib/sqlite3/database.rb b/lib/sqlite3/database.rb index ca955fd..627166c 100644 --- a/lib/sqlite3/database.rb +++ b/lib/sqlite3/database.rb @@ -147,6 +147,9 @@ module SQLite3 # Returns a Statement object representing the given SQL. This does not # execute the statement; it merely prepares the statement for execution. + # + # The Statement can then be executed using Statement#execute. + # def prepare( sql ) stmt = @statement_factory.new( self, sql ) if block_given? -- cgit