Module: Pakyow::Data::Adapters::Sql::DatasetMethods Private

Defined in:
lib/pakyow/data/adapters/sql/dataset_methods.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#count(dataset) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



20
21
22
23
24
# File 'lib/pakyow/data/adapters/sql/dataset_methods.rb', line 20

def count(dataset)
  dataset.qualify.count
rescue Sequel::Error => error
  raise QueryError.build(error)
end

#one(dataset) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
17
18
# File 'lib/pakyow/data/adapters/sql/dataset_methods.rb', line 14

def one(dataset)
  dataset.qualify.first
rescue Sequel::Error => error
  raise QueryError.build(error)
end

#to_a(dataset) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
# File 'lib/pakyow/data/adapters/sql/dataset_methods.rb', line 8

def to_a(dataset)
  dataset.qualify.all
rescue Sequel::Error => error
  raise QueryError.build(error)
end