Permalink
Commits on Apr 2, 2013
  1. Update the 3.46.0 release notes

    I noticed that the cache clearing changes can affect backwards
    compatibility slightly, so note that and give an example in the
    release notes.
    committed Apr 2, 2013
  2. Bump version to 3.46.0

    committed Apr 2, 2013
  3. Don't add eager and eager_graph to Model::DATASET_METHODS

    These methods should be added by the associations plugin, they
    shouldn't be a basic part of Sequel::Model.
    committed Apr 2, 2013
Commits on Mar 29, 2013
  1. Add Dataset#first! to Dataset::ACTION_METHODS

    This allows Model.first! to work.
    committed Mar 29, 2013
Commits on Mar 26, 2013
  1. Add Dataset#cross_apply and Dataset#outer_apply on Microsoft SQL Server

    These are join methods, but unlike traditional JOINs, these allow
    you to reference other tables already in the dataset (useful
    mostly with table returning functions).
    committed Mar 26, 2013
  2. Add warnings in RDoc for all methods that can enable code execution

    Thanks to Tom Maher for this idea.
    committed Mar 26, 2013
Commits on Mar 25, 2013
  1. Speed up threaded connection pools when :connection_handling=>:queue …

    …is used
    
    From my benchmarking, on MRI the push/shift combination is
    significantly faster than unshift/pop.
    committed Mar 25, 2013
  2. Add database/features.rb and database/transactions.rb

    This just moves some code out of misc.rb, query.rb, and
    schema_methods.rb, and does a better job of organizing things.
    committed Mar 25, 2013
  3. Minor cleanups in Database.connect

    Simplify the connection option code and the connection block
    return value code.
    
    Set adapter scheme should always be called with a symbol.  With
    the previous code, the ADAPTER_MAP would work if given a string,
    but the @scheme would be incorrect.  All internal adapters use
    a symbol, and external adapters should as well.
    committed Mar 25, 2013
  4. Minor RDoc fix

    committed Mar 25, 2013
  5. Minor code formatting fixes

    committed Mar 25, 2013
  6. Make Database#each_server raise if not given a block

    Without a block, this would be a no-op that leaks Database
    references, so make that an error.
    committed Mar 25, 2013
  7. Allow external connection pool classes to be loaded automatically

    This is similar to earlier changes for external plugins, extensions,
    and adapters.  Just put your custom connection pool class in
    sequel/connection_pool/my_pool_class.rb in the ruby load path,
    make sure it registers itself in
    Sequel::ConnectionPool::CONNECTION_POOL_MAP and then use
    :pool_class=>:my_pool_class Database option.
    
    While here, fix small RDoc issue.
    committed Mar 25, 2013
  8. Switch Travis configuration

    Start testing on ruby 2.0, drop support for testing jruby-head,
    ruby-head, and ree, remove allowed failures.
    committed Mar 25, 2013
Commits on Mar 24, 2013
Commits on Mar 22, 2013
  1. Add Dataset#with_pk! for model datasets, like #with_pk, but raising i…

    …nstead of returning nil
    committed Mar 22, 2013
  2. Add Dataset#first!, like #first, but raising a Sequel::NoMatchingRow …

    …exception instead of returning nil
    
    In cases where you are expecting a row to exist, and the lack
    of a row would be an exceptional case, this method is helpful
    for two reasons:
    
    1) It's less verbose.
    2) It raises a specific error class, which libraries that
       interact with Sequel can handle specially (e.g. using
       a 404 error instead of a 500 error on a website).
    committed Mar 22, 2013
  3. Dataset #select_map, #select_order_map, and #get no longer support a …

    …plain string inside an array of arguments
    
    Before, they supported a plain string only by accident, since
    recursion was used and they support strings inside of
    Identifier and similar expression objects.
    
    Basically, we need to be able to guess the symbol that will be
    used in the returned hash, and if a plain string is used, it is
    unlikely the database will use that string as the returned
    column name.
    committed Mar 22, 2013
  4. Force a specific rspec version and gem when generating website rdoc

    This is mostly for my personal benefit, so I don't actually
    screw up when updating the website documentation.
    committed Mar 22, 2013
  5. Escape ] characters in identifiers on Microsoft SQL Server

    This also adds a spec for identifier escaping.
    committed Mar 22, 2013
  6. Update the security guide

    Bunch of changes, many recommended by Jason Rogers and Michael
    Lang.  In addition to the changes in the guide itself, make it
    more prominent by mentioning it in the README, and making it
    the second link on the documentation page, directly after the
    README.
    
    Because the core_extensions are still used by default, include
    their documentation in the Core/Model documentation.
    committed Mar 22, 2013
  7. Avoid creating symbols in the pretty_table extension

    There doesn't seem to be a reason to convert to symbols here.
    committed Mar 22, 2013
  8. Add security guide

    This gives a basic overview of security issues when using Sequel,
    and how to avoid potential vulnerabilities.  Still a bit rough,
    but I'm committing it early in hopes of refining it after some
    feedback.
    committed Mar 22, 2013
Commits on Mar 20, 2013
Commits on Mar 13, 2013
  1. Have associations, composition, serialization, and dirty plugins clea…

    …r caches in some additional cases
    
    Previously, if the model's dataset supported insert_select, the
    caches used by the associations, composition, serialization, and
    dirty plugins would not be cleared when saving new records.  Also,
    if set_values was used directly, the cache would not be cleared.
    
    This makes it so that set_values clears the cache, and since all
    types of refreshes run through set_values, this handles the cases
    without other problems.
    
    One issue with this is that set_values is called when creating
    model instances.  As such, this has a performance hit when
    creating new instances.  This makes Model.call significantly slower,
    but actually usage with a database is only about 3% slower when
    fetching large numbers of records, which I consider acceptable.
    committed Mar 13, 2013
Commits on Mar 11, 2013
  1. Fix typo.

    djanowski committed Mar 11, 2013
Commits on Mar 8, 2013
Commits on Mar 7, 2013
  1. Merge the drop_foreign_key alter_table generator method

    Add and modify specs to cover the foreign_key_name method.
    
    Update related documentation.
    
    Make SQLite handle drop_foreign_key by only dropping the
    related foreign key constraint instead of all foreign keys
    contraints.
    committed Mar 7, 2013