hash_aliases.rb

lib/sequel/extensions/hash_aliases.rb
Last Update: 2016-02-11 15:50:14 -0800

The hash_aliases extension allows Dataset#select and Dataset#from to treat a hash argument as an alias specification, with keys being the expressions and values being the aliases, which was the historical behavior before Sequel 4. It is only recommended to use this for backwards compatibility.

You can load this extension into specific datasets:

ds = DB[:table]
ds = ds.extension(:hash_aliases)

Or you can load it into all of a database's datasets, which is probably the desired behavior if you are using this extension:

DB.extension(:hash_aliases)

Related module: Sequel::HashAliases