Add Sequel::Database.after_initialize hook
Update CHANGELOG
Use Dataset#literal instead of Expression#to_s in core_refinements spec
Remove remaining internal uses of Dataset#source_list
Remove remaining internal of Dataset#table_ref
Add array of available PostgreSQL lock modes

In Sequel 4, we'll be checking Dataset#lock input against this
array.
Remove meta_def extension use from core specs

The core specs should not use extensions, to ensure that nothing
in core depends on an extension.

This is a mostly mechanical change, moving from using the
meta_def Database/Dataset instance method to using a instance
method in the spec example group class.

Note that the meta_def extension is still used in the extension
specs.  However, as the extension specs would load it anyway and
it makes a global change, there seems little point to changing the
them.
Mention security issues with Dataset#lock_style
Reference driver before loading database-specific code in jdbc adapter (Fixes #646)

If the Database attempts to connect on initialization (which at
least PostgreSQL does in some circumstances), the jdbc adapter
breaks because the driver class is not referenced first, and
java.sql.DriverManager.getConnection cannot find it otherwise
(which is a longstanding bug in JRuby, IMO).  Anyway, making
sure the driver class is referenced first fixes the issue.
Reduce two conditionals to one in associations code
Handle more corner cases in the many_to_one_pk_lookup plugin

This handles all known corner cases in the many_to_one_pk_lookup
plugin.  It should be safe to enable this by default in all
apps without breaking things.  It has substantial performance
advantages even when one of the caching plugins is not used,
because of the opimitized SQL generation for model primary key
lookups.
Make Model.count not issue a database query if using the static_cache plugin
Allow Model#modified! and #modified? to take optional column argument

This is a nicer API for of checking/manipulating changed_columns.
Add auto_validations plugin, for automatically adding presence, not_string, and unique validations

This plugin is mainly useful if you want to easily add common
validations that can be determined from the model schema, and
do not care about using custom validation messages per column.
Skip validates_unique validation if underlying columns are not valid

If the underlying columns are not valid, the database query to
determine uniqueness could raise an error (for example, an integer
column not in integer format).  That defeats the purpose of
attempting to validate first, so skipping the uniqueness check is
probably best.  The model object is going to be considered invalid
anyway, so the only behavior change other than not raising the
error is that there will be no errors entry for the uniqueness
validation in some cases.
Add error_splitter plugin, for splitting multi-column errors into separate errors per column

This makes it easy to use the auto_validations plugin to
automatically add multi-column uniqueness checks, and have
validation error handling code automatically be able to
associate the uniqueness error with each related column
(e.g. highlighting all appropriate fields on a web form).
Add Database#schema_type_class for getting the ruby class or classes related to the type symbol

This can be used to automatically validate model instance column
values against the appropriate schema type.
Allow validates_type validation to accept an array of allowable classes

There are some cases where multiple classes would be valid for a
given column.  The most obvious is boolean columns, which can be
either TrueClass or FalseClass.

While here, slightly change the default validates_type message.
Before, this used a capital class name, but that is inconsistent
with the rest of the messages.  Now it uses a lowercase name.
Add Model#schema_type_class for getting the class for given column's type

Not used internally by the core yet, but will be useful for plugins.
Add validates_schema_types validation for validating column values are instances of an appropriate class

Previously, one of the recommended approaches for dealing with invalid
input with Sequel in web applications was to use the not_string
validation in combination with raise_on_typecast_failure = false.
The idea behind this is that invalid input comes in the form of a
string, so you could use this on non-string types to validate that
the value was typecast correctly.

Unfortunately, while this works in most cases, it is a flawed
approach.  First of all, web application input can also come in the
form of a hash or array (default rack param parsing), and the
not_string validation wouldn't catch that.  Second, you can't use
the not_string validation for string or blob columns, so it isn't
generally applicable.

This new approach uses the database schema information in combination
with the recently added schema_type_class method to get the
appropriate ruby class for a given schema type symbol, and check
that the column value is an instance of that class.

This should be safe to use for all model instances.  Unhandled
database types won't be affected, nor will database types that
have no appropriate ruby class (such as enum).  Every column type
with a handled type class should have a value that is an instance
of the related type, assuming that typecasting works correctly.

The only time this will cause problems is if the database does
not return correctly typecasted values, in which case you'll want
to use the typecast_on_load plugin.