http://github.com/jeremyevans/sequel/commit/8dd3d15da06d8aaafc1a4622c92b12a5b405ac80

Commit message:

Add almost full support for PostgreSQL-JDBC, other major changes

This commit enables almost full support for PostgreSQL-JDBC.  The
only thing that isn't supported is that bytea columns are not
returned as SQL::Blobs, they are returned as a proxy to a java
object.  I'm not sure how best to handle the situation, and as I
don't use blobs I'll wait for a patch from someone who cares enough
to fix it.

In order to fully support PostgreSQL-JDBC, the postgres adapter
needed to be split into parts that were adapter dependent and parts
that were not.  Luckily, most parts were not adapter dependent, so
most code is shared between the native (pg, postgres, postgres-pr)
and JDBC postgres adapters.

There isn't any extra support for other JDBC drivers.  I may attempt
to support the MySQL and SQLite JDBC adapters in the future, but I'm
not sure about that yet.  I welcome patches from the community if
you want other databases fully supported using JDBC.

The Base JDBC adapter had a few changes, most notably that it
now converts exceptions into Sequel::Errors.  I only tested this with
PostgreSQL-JDBC, so YMMV on other JDBC adapters.  Also, I added a
usec method to Java::JavaSQL::Timestamp, allowing it to work with
PostgreSQL timestamp literalization.

There are some other changes that are going in along side this
commit.  The first is that the insert, update, and delete Dataset
methods are getting default implementations.  Most adapters shared
the same code, so it's better to have a default implementation than
the same or very similar code in all adapters.  I tried to be
careful when modifying most adapters, since I don't test any but
PostgreSQL, SQLite, and MySQL.  If I broke something, I apologize,
please post a patch on the bugtracker and/or ping me on IRC.

Another change is the addition of the execute_ddl and execute_dui
Database methods.  execute_dui should be used for DELETE, UPDATE,
and INSERT statements, execute_ddl should be used for any DDL
statements (CREATE TABLE, ALTER TABLE, DROP TABLE, etc.).  Most
users will not care about this as they are unlikely to be used
directly.

The Database methods that execute DDL statements use execute_ddl,
and the default implementations of Dataset insert, update, and
delete use execute_dui.  Also, the schema methods that take blocks
that are passed to the schema generators now also take an optional
additional argument specifying an existing generator instead of a
block.  The Model schema methods use this to reduce code duplication.

Model#create_table! now works the same way as Database#create_table!,
in that it drops the table and rescues errors instead of checking if
the table exists.

Some other adapter changes:

Informix - execute is now an alias of query, do is an alias of the
old execute method, which is now named execute_dui.  This change
was made for consistency, and should not affect you unless you
were calling the method directly.

Postgres - string_to_bool is now a singleton method of the
Sequel::Postgres module instead of the Sequel::Postgres::Adapter
class.  This is unlikely to affect you unless you were using the
method directly.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to