Sha256: f93cc45589360dc5ed03179aa3e565386d93588147c75f2d9ee9fbc9794f2bf3
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
module Sequel # A dataset represents an SQL query, or more generally, an abstract # set of rows in the database. Datasets # can be used to create, retrieve, update and delete records. # # Query results are always retrieved on demand, so a dataset can be kept # around and reused indefinitely (datasets never cache results): # # my_posts = DB[:posts].filter(:author => 'david') # no records are retrieved # my_posts.all # records are retrieved # my_posts.all # records are retrieved again # # Most dataset methods return modified copies of the dataset (functional style), so you can # reuse different datasets to access data: # # posts = DB[:posts] # davids_posts = posts.filter(:author => 'david') # old_posts = posts.filter('stamp < ?', Date.today - 7) # davids_old_posts = davids_posts.filter('stamp < ?', Date.today - 7) # # Datasets are Enumerable objects, so they can be manipulated using any # of the Enumerable methods, such as map, inject, etc. # # For more information, see the {"Dataset Basics" guide}[rdoc-ref:doc/dataset_basics.rdoc]. class Dataset OPTS = Sequel::OPTS include Enumerable include SQL::AliasMethods include SQL::BooleanMethods include SQL::CastMethods include SQL::ComplexExpressionMethods include SQL::InequalityMethods include SQL::NumericMethods include SQL::OrderMethods include SQL::StringMethods end require(%w"query actions features graph prepared_statements misc mutation sql", 'dataset') end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
sequel-4.8.0 | lib/sequel/dataset.rb |
sequel-4.7.0 | lib/sequel/dataset.rb |
sequel-4.6.0 | lib/sequel/dataset.rb |
sequel-4.5.0 | lib/sequel/dataset.rb |
sequel-4.4.0 | lib/sequel/dataset.rb |