Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 27, 2012
Commits on May 25, 2012
  1. @pvh

    is_current? for Schema::Migrator

    pvh authored
Commits on May 24, 2012
  1. Add pg_inet extension, for working with PostgreSQL inet and cidr types

    authored
    ActiveRecord added this support recently, and I think it's a
    worthwhile extension to have.
  2. Fix bug in model column setters when passing an object that raises an…

    authored
    … exception for ==('')
    
    Personally, I think such an object is broken, but there exist
    examples of brokenness in ruby's stdlib, so it's best to support
    this.
  3. Skip a postgres spec on Windows ruby 1.9.3

    authored
    Looks like 1.9.3 is affected just like the other Windows MRI
    versions for this spec.
  4. Add eager_each plugin, which makes each on an eagerly loaded dataset …

    authored
    …do eager loading
    
    This behavior has been requested by multiple people over the years.
    I've always been against changing having all call a method other
    than each for eager loading.  I just recently thought of this
    approach, which doesn't require any changes to the core of Sequel.
  5. Fix bug when parsing foreign keys for tables with explicit schema on …

    authored
    …PostgreSQL
    
    There were multiple bugs here.  The first bug is that because a mutation
    method was used for the join, but not for the where/select_more, the
    where/select_more was skipped.  The second bug is that the where code
    used an implicit alias instead of an implicit qualifier. The third
    bug was that when the schema was used, an error would be raised
    because it would try to call the output identifier method with
    a qualified identifier.
    
    Fix these bugs and add a spec for the behavior.
  6. Remove overrides of execute_insert in bound variables/prepared statem…

    authored
    …ent postgres code
    
    These have not been needed since 3.35.0.
  7. Remove Database#case_sensitive_like on SQLite

    authored
    Turns out that SQLite only has a setter PRAGMA for case sensitive
    like, not a getter PRAGMA, so the previous getter always returned
    false.
    
    Note that the setter method is still there, so you can still
    change the setting, you just can't easily check for whether the
    setting is enabled or not.
  8. Remove Database#single_value in the sqlite adapter

    authored
    This method hasn't been used for some time.  I think at one point,
    it was used by Dataset#single_value.  As I don't think users
    should be calling it directly, it's probably best to remove it.
    This breaks backwards compatibility, users who need similar
    functionality should switch to using Dataset#single_value.
    
    While here, remove the handling of an options hash for the private
    defined_columns_for method in the shared adapter.  This was used
    at one point, but hasn't been any longer.
    
    Also while here, add some specs for the case sensistive like
    setter.
  9. Make Dataset#get work with nil and false arguments

    authored
    Before, if you passed nil or false, it ignored the argument and
    used the block.  And if you didn't provide a block, it acted like
    select_all.  Change it to use a default argument that can tell
    whether an argument was provided.
    
    This could potentially affect backwards compatibility, but
    I think the previous behavior was broken.
  10. Make json_serializer plugin respect :root=>:collection and :root=>:in…

    authored
    …stance options
    
    The current behavior of the json_serializer plugin when the :root
    option is given to the class or dataset to_json method is a bit
    redundant, since it wraps both the collection and instances in
    hashes.  I think changing the behavior is too risky in terms of
    backwards compatibility, so I added additional options so that
    users can pick the behavior they want.  I expect most users
    will want :root=>:collection, and at some point in the future
    that will probably become the default.
  11. Include core_extension coverage in spec_plugin_cov, not spec_cov

    authored
    While here, change the threshold to 100%, so that files with
    100% coverage aren't shown.
    
    Sequel is now back to 100% code coverage for core, model, plugins,
    and extensions.  The core/model specs don't show 100% code
    coverage because there are a few branches that are based on the
    ruby version or engine.
  12. Add some more specs

    authored
Commits on May 23, 2012
  1. Support savepoints in prepared transactions in MySQL 5.5.23+

    authored
    The MySQL bug that cause this to fail starting in 5.5.12 has been
    fixed starting in 5.5.23
  2. Don't override log_connection_execute in the mock adapter

    authored
    Instead, have the mock connection execute method not log sql.
  3. Only check coverage for extensions and plugins in spec_plugin_cov

    authored
    This removes the other files from the output, since they are just
    noise.
  4. Add spec for tactical eager loading with undefined association

    authored
    While here, fix the RDoc for tactical eager loading.  The original
    implementation used the identity_map, but I'm pretty sure I made
    it not require the identity_map before adding it to Sequel.
  5. Always attempt to load the ActiveSupport inflector in the plugin specs

    authored
    This attempts to load the ActiveSupport inflector first, before
    the Sequel inflector, since the Sequel inflector should then
    override the ActiveSupport inflector.  Remove the check for the
    ActiveSupport inflector in the inflector spec, since it should
    never take affect.
    
    You'll know if the ActiveSupport inflector is still in place if
    the inflector specs start failing.
  6. Remove Database#execute_insert override from pg_auto_parameterize

    authored
    Since 3.35.0, this method is no longer called, since all inserts
    use RETURNING now.
  7. Give better error message for bad JDBC URL usage

    authored
    At least on PostgreSQL, if you use a bad JDBC URL string,
    driver.new.connect can return nil in this case.  You would
    get an error later inside setup_connection, but it's better
    to raise the error earlier.
  8. Add pg_json extension, for working with PostgreSQL 9.2's new json type

    authored
    This is modeled on the pg_hstore and pg_array extensions, using
    the same DelegateClass approach.
    
    It does not currently support plain numbers or strings in a json
    column, which PostgreSQL supports.  Support for that could
    be added later if there is demand, just be adding custom parsers
    and more DelegateClasses.  However, I think PostgreSQL is wrong
    in the this case and it shouldn't be accepting those values,
    which is why the extension doesn't currently support it.  Another
    reason is that typecasting from a string would then be ambiguous,
    since you wouldn't know whether it was literal JSON that should
    be parsed, or represented a plain string that should be wrapped
    in a DelegateClass.
  9. In the optimistic locking plugin, make refresh and save after a faile…

    authored
    …d save work correctly
    
    Before, since instance filters were only cleared after a successful
    save, if you rescued the error raised by save, refreshed and then
    saved, it would add the lock column filter twice, once with the
    old value and one with the new value.
    
    The simplest way to fix this is just to make refreshing clear
    the instance filters, since saving will add the correct one
    back.
    
    Note that this potentially could skip the instance filter if you
    refreshed your model in a before_update after the instance filter
    was added.  I doubt anyone would do that.
Something went wrong with that request. Please try again.