<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/sequel/adapters/amalgalite.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 === HEAD
 
+* Add Amalgalite adapter (jeremyevans)
+
 * Remove Sequel::Metaprogramming#metaattr_accessor and metaattr_reader (jeremyevans)
 
 * Remove Dataset#irregular_function_sql (jeremyevans)</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,9 @@ Sequel is a lightweight database access toolkit for Ruby.
   configurations, and database sharding.
 * Sequel makes it easy to deal with multiple records without having
   to break your teeth on SQL.
-* Sequel currently has adapters for ADO, DataObjects, DB2, DBI,
-  Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle, PostgreSQL
-  and SQLite3.
+* Sequel currently has adapters for ADO, Amalgalite, DataObjects,
+  DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,
+  PostgreSQL and SQLite3.
 
 == Resources
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ module Sequel
   # Top level module for holding all SQLite-related modules and classes
   # for Sequel.
   module SQLite
-    # Database class for PostgreSQL databases used with Sequel and the
+    # Database class for SQLite databases used with Sequel and the
     # ruby-sqlite3 driver.
     class Database &lt; Sequel::Database
       UNIX_EPOCH_TIME_FORMAT = /\A\d+\z/.freeze
@@ -106,7 +106,7 @@ module Sequel
       private
       
       # Log the SQL and the arguments, and yield an available connection.  Rescue
-      # any SQLite3::Exceptions and turn the into DatabaseErrors.
+      # any SQLite3::Exceptions and turn them into DatabaseErrors.
       def _execute(sql, opts)
         begin
           log_info(sql, opts[:arguments])
@@ -116,7 +116,7 @@ module Sequel
         end
       end
       
-      # SQLite does not need the pool to convert exceptions.
+      # The SQLite adapter does not need the pool to convert exceptions.
       # Also, force the max connections to 1 if a memory database is being
       # used, as otherwise each connection gets a separate database.
       def connection_pool_default_options
@@ -226,6 +226,7 @@ module Sequel
       
       private
       
+      # Quote the string using the adapter class method.
       def literal_string(v)
         &quot;'#{::SQLite3::Database.quote(v)}'&quot;
       end</diff>
      <filename>lib/sequel/adapters/sqlite.rb</filename>
    </modified>
    <modified>
      <diff>@@ -135,7 +135,7 @@ describe &quot;Database schema modifiers&quot; do
     INTEGRATION_DB.alter_table(:items){add_column :name, :text}
     INTEGRATION_DB.schema(:items, :reload=&gt;true).map{|x| x.first}.should == [:number, :name]
     @ds.columns!.should == [:number, :name]
-    unless INTEGRATION_DB.url =~ /sqlite/
+    unless INTEGRATION_DB.url =~ /sqlite|amalgalite/
       INTEGRATION_DB.alter_table(:items){add_primary_key :id}
       INTEGRATION_DB.schema(:items, :reload=&gt;true).map{|x| x.first}.should == [:number, :name, :id]
       @ds.columns!.should == [:number, :name, :id]</diff>
      <filename>spec/integration/schema_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>26ead69d0c1616cfad7f9694c99b87222f76e4af</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Evans</name>
    <email>code@jeremyevans.net</email>
  </author>
  <url>http://github.com/jeremyevans/sequel/commit/8398b5bf8a148ed24de9043480a2040628206ebf</url>
  <id>8398b5bf8a148ed24de9043480a2040628206ebf</id>
  <committed-date>2009-04-15T14:07:12-07:00</committed-date>
  <authored-date>2009-04-15T14:07:12-07:00</authored-date>
  <message>Add Amalgalite adapter

Amalgalite is a ruby library that embeds SQLite in a ruby extension
without requiring a separate SQLite installation.

This adapter is full featured and passes all integration tests, and
all but one of the SQLite adapter tests (I could fix that failing
test, but I don't think it's worth it).

The only major issue with the amalgalite adapter is that it is
currently pretty slow (10 times slower in the integration tests,
40 times slower in the adapter specs).  This could have something
to do with the fact that the adapter reloads the entire schema
whenever there is a possibility that cached information could be
stale.  I didn't want to do that, but otherwise amalgalite can
give you weird NoMethodErrors.

As I don't use this in production, I'm not planning on working on
the performance issues.</message>
  <tree>45ab43d85dedc561ae021a597b767568dd0a0a67</tree>
  <committer>
    <name>Jeremy Evans</name>
    <email>code@jeremyevans.net</email>
  </committer>
</commit>
