Add replace support to SQLite adapter
Correctly raise error when using an invalid virtual row block function call

Because VirtualRow is a BasicObject subclass, and raise is an Object
method, not a keyword, raise inside a VirtualRow doesn't raise an
exception, it treats it as calling the raise database function, you
need to use Kernel.raise to raise an exception.  Not caught previously
by the specs as the specs also checked for literalization, and an
exception is raised later when trying to literalize the exception
class.
Minor cleanup for Dataset#replace refactoring
Show example of placeholder use with raw SQL in prepared statements guide
Allow CHECK constraints to have options by using an options hash as the constraint name

Previously, the API did not allow for check constraints to have
options, since all arguments to the constraint method were used
for the constraint itself.  This allows you to pass an options
hash as the constraint name, allowing you to use constraint
options.

This is most useful to allow NOT VALID to be used when adding
CHECK constraints to existing tables on PostgreSQL.
Remove unneeded duplication definition of having in shared mysql adapter
Raise NoMatchingRow if calling add_association with a primary key value that doesn't match an existing row

Previously, a NoMethodError would have been raised later on in the
code.  This raises the error where it should be raised and makes
it clear it is because there is no matching row.
Convert Java::JavaUtil::HashMap to ruby Hash in jdbc adapter, for better handling of PostgreSQL hstore type (Fixes #686)

In general, the jdbc adapter should convert java types to ruby
types.  This wasn't being done for the hstore type, so Java
HashMap instances were being returned.  The typecasting code
doesn't know what to do with such instances, so it wasn't
converting them to Postgres::HStore instances.

With this patch and the typecast_on_load plugin in the model,
model instances will have hstore values returned as
Postgres::HStore instances.
Mention typecast_on_load plugin in pg_typecast_on_load RDoc
Fix examples that use the core extensions in the activerecord guide
Remove enum example from cheat sheet, since it doesn't work on PostgreSQL

PostgreSQL requires a separate CREATE TYPE for each enum.
Support mysql2 0.3.12+ result streaming via Dataset#stream

I wrote the specs for this over a year ago, before the first beta
of 0.3.12 was released.  Thankfully, the implementation was fairly
easy, with the only tricky part being error handling for streamed
datasets where not all rows were retrieved.
Support :drvconnect option in odbc adapter for supplying the ODBC connection string directly

Previously, there wasn't a way to specify the ODBC connection
string directly.  The :driver option used a similar ruby ODBC
interface, but it created a connection string that was probably
broken.  Since it doesn't look like such connection strings work,
I'm deprecating that interface.
Make Database#run and #<< accept SQL::PlaceholderLiteralString values

This allows the following to work:

  DB << Sequel.lit("Some SQL with ? and ?", :foo, :bar)
Added support for deferrable exclude constraints
Minor cleanup for deferrable exclusion constraints

Only run the spec on PostgreSQL 9.0+, and test for behavior and
not for specific SQL.
Remove unused private method in pg_json_ops
Allow prepared_statements plugin to work with instance_filters and update_primary_key plugins

Previously, it was documented that the plugins didn't work
together.  It makes sense that they can't, since prepared statements
require the same behavior for every call, and instance_filters
and update_primary_key plugins can have different behavior depending
on instance state.

However, it was annoying that they don't work together, since the
behavior is that things appear to work, but the instance_filters
or update_primary_key behavior is just ignored, since prepared
statements overrides methods at a higher level.

So the simplest fix is just to have prepared_statements plugin
not use a prepared statement and fallback to the default behavior
in that case.  Unfortunately, the only way I can think of to do
that reliably is to have a base instance method defined, and have
other plugins override it.  So that's basically what I did, adding
a method to Model::InstanceMethods inside the plugin, and having
other plugins override it.  This implementation means that it
doesn't matter in which order you load the plugins or where you
load them in the class hierarchy.
Remove deprecated `should_not raise_error(SpecificError)`.
Cf. https://github.com/rspec/rspec-expectations/issues/231
Missed some redundant lines.