class User::BaseQuery

Included Modules

Direct Known Subclasses

Defined in:

Class Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.all #

def self.find(id) #

def self.first #
Description copied from module Enumerable(User)

Returns the first element in the collection. Raises Enumerable::EmptyError if the collection is empty.

([1, 2, 3]).first   # => 1
([] of Int32).first # raises Enumerable::EmptyError

def self.first? #
Description copied from module Enumerable(User)

Returns the first element in the collection. When the collection is empty, returns nil.

([1, 2, 3]).first?   # => 1
([] of Int32).first? # => nil

def self.last #

def self.last? #

def self.new_with_existing_query(query : Avram::QueryBuilder) #

def self.preload_merchant(records : Enumerable, preload_query) #

def self.preload_merchant(record, preload_query) #

def self.preload_merchant(records : Enumerable) #

def self.preload_merchant(record) #

def self.preload_merchant(records : Enumerable, &) #

def self.preload_merchant(record, &) #

def self.truncate #

Instance Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def created_at(value) #

def created_at #

def email(value) #

def email #

def encrypted_password(value) #

def encrypted_password #

def find(id) #

def full_join_merchant #

def id(value) #

def id #

def inner_join_merchant #

def join_merchant #

def left_join_merchant #

def merchant(&) #

def preload_merchant(preload_query : Merchant::BaseQuery) #

def preload_merchant #

def right_join_merchant #

def update(id : UUID | Nothing = Nothing.new, created_at : Time | Nothing = Nothing.new, updated_at : Time | Nothing = Nothing.new, email : String | Nothing = Nothing.new, encrypted_password : String | Nothing = Nothing.new) : Int64 #
Description copied from module Avram::Queryable(User)

Update the records using the query's where clauses, or all records if no wheres are added.

Returns the number of records updated as Int64.

# Update all comments with the word "spam" as spam
CommentQuery.new.body.ilike("spam").update(spam: true)

def updated_at(value) #

def updated_at #

def where_merchant(assoc_query : Merchant::BaseQuery, auto_inner_join : Bool = true) #

Macro Detail

macro generate_criteria_method(name, type) #