SQLite3/Ruby Interface
DESCRIPTION
This module allows Ruby programs to interface with the SQLite3 database engine (www.sqlite.org). You must have the SQLite engine installed in order to build this module.
INTEGRATED Sqlite3 distribution
This gem (sqlite3-full) differs from sqlite3 only in so far, as it embeds a standardized sqlite3 engine: instead of compiling against whatever version exists on the target system this gem comes always with the same feature set.
The current feature set includes:
-
The SOUNDEX extension (www.sqlite.org/lang_corefunc.html#soundex)
-
The FTS3 and FTS4 fulltext search extensions (www.sqlite.org/fts3.html)
-
The RTREE index extension (www.sqlite.org/rtree.html)
SYNOPSIS
require "sqlite3"
# Open a database
db = SQLite3::Database.new "test.db"
# Create a database
rows = db.execute <<-SQL
create table numbers (
name varchar(30),
val int
);
SQL
# Execute a few inserts
{
"one" => 1,
"two" => 2,
}.each do |pair|
db.execute "insert into numbers values ( ?, ? )", pair
end
# Execute inserts with parameter markers
db.execute("INSERT INTO students (name, email, grade, blog)
VALUES (?, ?, ?, ?)", [@name, @email, @grade, @blog])
# Find a few rows
db.execute( "select * from numbers" ) do |row|
p row
end
Compilation and Installation
gem install sqlite3-full
SUPPORT!!!
OMG! Something has gone wrong! Where do I get help?
If you can replicate the bug with the sqlite3-ruby gem, the best place to get help might be the sqlite3-ruby mailing list which can be found here:
* http://groups.google.com/group/sqlite3-ruby
Otherwise file the bug at sqlite3-full’s bugtracker here:
* https://github.com/radiospiel/sqlite3-full/issues
Usage
For help figuring out the SQLite3/Ruby interface, check out the SYNOPSIS as well as the RDoc. It includes examples of usage. If you have any questions that you feel should be address in the FAQ, please send them to the mailing list
Source Code
The source repository is accessible via git:
git clone git://github.com/radiospiel/sqlite3-full.git