class Perpetuity::Postgres::Query
Attributes
klass[R]
query[R]
Public Class Methods
new(&block)
click to toggle source
# File lib/perpetuity/postgres/query.rb, line 9 def initialize &block if block_given? @query = block else @query = proc { NilQuery.new } end end
Public Instance Methods
method_missing(name)
click to toggle source
# File lib/perpetuity/postgres/query.rb, line 29 def method_missing name QueryAttribute.new(name) end
to_db()
click to toggle source
# File lib/perpetuity/postgres/query.rb, line 17 def to_db query.call(self).to_db end
to_s()
click to toggle source
# File lib/perpetuity/postgres/query.rb, line 25 def to_s to_db end
to_str()
click to toggle source
# File lib/perpetuity/postgres/query.rb, line 21 def to_str to_db end