…ing performance Previously, when using the native SQLite adapter Sequel would treat prepared statements exactly the same as bound variables, by just executing the prepared statement SQL with the bound variables. With this commit, Sequel will create and cache a prepared statement object on a per connection basis, and reuse the prepared statement object if you execute the prepared statement again with different bound variables. So instead of having to parse the SQL given every time the prepared statement is executed, it only needs to parse it once when preparing the query, and then can just execute it with new bound variables. This also refactors parts of the native SQL adapter to make things simpler.
…o which association methods are placed As the included doc updates state, this is only useful in rare circumstances. However, one of those circumstances is coming up shortly.
…dd/remove/remove_all methods This is useful if the association filters on columns in the join table and you want to respect those filters when adding and removing objects from the association.
…ead of 3 arguments The previously supported API of using 3 separate arguments is still supported. However, the new API is more flexible, and is required to get access to the dataset that is doing the eager loading. That will be used in the future to make sure the sharding plugin works for eager loading. With the new API, the hash passed to the eager_loader proc is populated with the keys :key_hash, :rows, :associations, and :self, with the first three keys corresponding to the old argument order, and the new :self key being the dataset doing the eager loading. The Model.eager_loading_dataset method now also accepts an options hash as an optional fifth argument, which should be backwards compatible.
…g order This is useful if the dataset is already ordered, and you want to modify the order, but still keep the original order as the fallback. Example: # Dataset ordered by albums name ds = DB[:albums].join(:artists, :id=>:artist_id). order(:albums__name) # You want to order it by artists, but keep the existing # order by album for albums by the same artist ds.order_prepend(:artists__name)
…tions and Schema Modification guide