Permalink
Commits on Oct 2, 2012
Commits on Sep 30, 2012
  1. Include Sequel::SQL::AliasMethods in Sequel::Postgres::PGArray to all…

    …ow aliasing PGArrays without having to use Sequel.as()
    committed Sep 30, 2012
Commits on Sep 28, 2012
  1. minor documentation typo

    trevor committed Sep 28, 2012
  2. Handle failure to create a prepared statement better in the postgres,…

    … mysql, and mysql2 adapters (Fixes #560)
    jeremyevans committed Sep 28, 2012
Commits on Sep 27, 2012
  1. Make DB2 cope with the clob changes

    DB2 treats clob as blob by default, so if use_clob_is_blob is
    true, it should continue to treat clobs as blobs.
    jeremyevans committed Sep 27, 2012
  2. Treat clob columns as strings instead of blobs

    Sequel has never had consistent treatment of clob fields.  Unlike
    blob fields, there is no special Sequel type for clobs, and
    historically, they were treated like blobs in most places, though
    a few adapters treated them like strings.
    
    This changes it so that clobs are treated as strings.  We return
    clob values as strings, not SQL::Blob instances, and have the
    model typecasting code cast clob column values to string instead
    of blob.
    
    This breaks backwards compatibility on some jdbc subadapters,
    since clob values will now be returned as strings instead of
    blobs.  However, as Sequel::SQL::Blob subclasses String, it
    is unlikely that this will cause any issues.  The only case I
    can think off where this will cause an issue is if the database
    requires clob columns to be literalized as blobs instead of
    strings.
    jeremyevans committed Sep 27, 2012
Commits on Sep 26, 2012
  1. Bump version to 3.40.0

    jeremyevans committed Sep 26, 2012
Commits on Sep 25, 2012
  1. Add a cubrid adapter for accessing CUBRID databases via the cubrid gem

    Due to issues with CUBRID itself and the cubrid ruby gem, I haven't
    bothered to add spec guards for all of the integration spec failures.
    If the situation improves I will probably do so.
    jeremyevans committed Sep 25, 2012
  2. Support Database#schema, #tables, #views, and #indexes on cubrid

    The jdbc/cubrid adapter currently uses the JDBC implementation,
    but this should work on all adapters that access CUBRID.
    jeremyevans committed Sep 25, 2012
  3. Recognize string database type as string ruby type

    CUBRID uses the STRING type.
    jeremyevans committed Sep 25, 2012
  4. Specifically set the primary key in some tests

    These tests are not testing for whether Sequel can correctly
    parse primary keys from the database, so they shouldn't fail
    just because Sequel doesn't parse the primary keys.
    jeremyevans committed Sep 25, 2012
  5. Don't use identifier input/output methods on CUBRID

    CUBRID uses case insensitive identifiers, so it doesn't make sense
    to have an input/output method.
    
    While here, do some reorganization and add some RDoc.
    jeremyevans committed Sep 25, 2012
  6. Add a jdbc/cubrid adapter for accessing CUBRID databases via JDBC on …

    …JRuby
    
    Note that this doesn't currently have integration spec guards
    when running the integration tests on CUBRID.  This is due to
    the excessive number of bugs in CUBRID itself.  Once CUBRID
    fixes these bugs, I'll consider adding the spec guards.
    jeremyevans committed Sep 25, 2012
  7. Refactor jdbc adapter, remove requires_return_generated_keys?

    Only the jdbc/mysql adapter used this feature, so just move
    the generated keys handling into the jdbc/mysql adapter.
    
    Break out some code into smaller methods for easier overriding.
    Make sure to pass the prepared statement object to last_insert_id
    when inserting.
    
    In mysql/jdbc, use return generated keys for prepared statement
    inserts as well as regular inserts.
    jeremyevans committed Sep 25, 2012
  8. Work around possible spec issue

    On some databases, a.b can refer to c.a.b, which breaks this query.
    I think that behavior is stupid, but as this spec is testing
    EXISTS and not the identifier lookup rules, it's best to just
    rename the table and avoid the issue.
    jeremyevans committed Sep 25, 2012
  9. Return non-String database defaults as ruby defaults

    Just in case the database default is a non-String value, we
    should return the value as-is instead of breaking later when
    using a regexp for parsing.
    jeremyevans committed Sep 25, 2012
Commits on Sep 24, 2012
  1. Return OCI8::CLOB values as ruby Strings in the Oracle adapter

    This makes them treated similarly to blobs, which are returned
    as instances of Sequel::SQL::Blob (a String subclass).
    jeremyevans committed Sep 24, 2012
  2. Use clob for String :text=>true types on Oracle, DB2, HSQLDB, and Derby

    Previously, attempting to use String :text=>true in a migration
    failed on these databases, since it uses the text type by
    default, and these databases don't support that type.
    jeremyevans committed Sep 24, 2012
  3. Allowing marshalling of Sequel::Postgres::HStore (Fixes #556)

    The underlying hash used by the delegate class must use a
    default proc for the symbol=>string conversion, so add
    _dump/_load methods that store the underlying data as
    an array instead of a hash.
    jeremyevans committed Sep 24, 2012
Commits on Sep 22, 2012
  1. very minor documentation typo

    trevor committed Sep 22, 2012
Commits on Sep 20, 2012
  1. Cleanup a schema spec

    jeremyevans committed Sep 20, 2012
  2. Only NOT NULL for unique constraint columns on DB2, not foreign key c…

    …olumns
    
    Foreign key columns are allowed to be NULL, but unique columns
    are not.  The previous code was plan wrong, but wasn't caught
    before as the foreign key tests and the unique tests were combined.
    jeremyevans committed Sep 20, 2012
  3. Add Dataset#identifier_list_append private method

    This is used to a get a comma separated list of identifiers, and
    DRYs up some common code.  This fixes an issue where CTE columns
    were not being quoted.
    
    This also removes the Dataset#argument_list and
    Dataset#argument_list_append private methods.  These methods need
    to be removed as they don't quote their arguments.
    jeremyevans committed Sep 20, 2012
Commits on Sep 17, 2012
  1. Fix initializing Database objects on PostgreSQL if there are existing…

    … PG_NAMED_TYPES
    
    This got broken when the conversion procs were moved from the native
    adapter to the shared adapter.  To fix it, just make sure that the
    conversion procs already exist, as they are used themselves when
    resetting the conversion procs if there are named types.
    Basically, if there are existing named types
    jeremyevans committed Sep 17, 2012
Commits on Sep 14, 2012
Commits on Sep 13, 2012
  1. Quote channel identifier names when using LISTEN/NOTIFY on PostgreSQL

    Before, the identifier names were unquoted, which meant that the
    LISTEN/NOTIFY query could break depending on the identifier used.
    Quoting them fixes this issue, but note that this makes the
    identifier case sensitive, and as such can break backwards
    compatibility.  If any of your channels are currently specified
    with uppercase characters when the actual channel is lowercase,
    or you are doing any manual quoting of the channel identifier,
    you need to update your code for these changes.
    jeremyevans committed Sep 13, 2012
  2. Handle nil values when formatting bound variable arguments in the pg_…

    …row extension (Fixes #548)
    
    Basically, pg_row piggy-backs on pg_array bound variable
    formatting, but array types use NULL to represent NULL,
    while row types use the empty string to represent NULL.
    
    While here, add tests for nil values in bound variables for
    arrays and hstore, even though the behavior there was already
    correct.
    jeremyevans committed Sep 13, 2012
Commits on Sep 12, 2012
  1. Handle nil values when parsing composite types in the pg_row extensio…

    …n (Fixes #548)
    
    Conversion procs are not expected to handle nil values, so they
    should not be called if the value is nil.
    jeremyevans committed Sep 12, 2012
Commits on Sep 10, 2012
  1. Detect an additional disconnect type in the postgres adapter

    This handles a bad file descriptor error, and should handle more
    types of disconnect errors by using a more general regexp.
    
    While here, also do a better job of handling disconnects, so that
    block is not called if a disconnect is detected, since in some
    cases block can raise a separate PGError.
    jeremyevans committed Sep 10, 2012
  2. Add :disconnect=>:retry option to Database#transaction, for automatic…

    …ally retrying the transaction on disconnect
    
    This has been requested numerous times over the years.  I think its
    a bad idea, but it's possible that it is the best alternative when
    dealing with a particularly bad database configuration.
    
    Basically, automatically retrying can cause all sorts of problems.
    The most likely way of getting it working is to only retry
    at transaction boundries.  For a sane database that rolls back
    transactions on disconnect, this should work OK for pure database
    code.  However, if you do any non-database work inside the
    transaction block, you need to be sure that that the work is
    idempotent in addition to making sure that it handles rollbacks
    correctly.
    jeremyevans committed Sep 10, 2012
Commits on Sep 7, 2012
  1. Update CHANGELOG

    jeremyevans committed Sep 7, 2012
  2. Change guard for class_table_interheritance integration tests

    The plugin requires support for JOIN USING so that ambiguous
    column name errors are not raised, so check for that support
    instead of listing all adapter that don't support it.
    jeremyevans committed Sep 7, 2012