module Ktistec::Model::ClassMethods
Defined in:
framework/model.crInstance Method Summary
-
#all(include_deleted : Bool = false, include_undone : Bool = false)
Returns all instances.
-
#all_subtypes
Returns type and all subtypes.
- #columns(prefix = nil)
- #conditions(*terms, include_deleted : Bool = false, include_undone : Bool = false, options : Hash(String, Any) | Nil = nil, **options_) forall Any
-
#count(options : Hash(String, Any), include_deleted : Bool = false, include_undone : Bool = false) forall Any
Returns the count of saved instances.
-
#count(include_deleted : Bool = false, include_undone : Bool = false, **options)
Returns the count of saved instances.
-
#empty?
Returns true if no instances exist.
-
#exec(query : String, args : Array | Nil = nil)
Runs the query.
-
#exec(query : String, *args_)
Runs the query.
-
#find(_id id : Int | Nil, include_deleted : Bool = false, include_undone : Bool = false)
Finds the saved instance.
-
#find(options : Hash(String, Any), include_deleted : Bool = false, include_undone : Bool = false) forall Any
Finds the saved instance.
-
#find(include_deleted : Bool = false, include_undone : Bool = false, **options)
Finds the saved instance.
-
#find?(_id id : Int | Nil, include_deleted : Bool = false, include_undone : Bool = false)
Finds the saved instance.
-
#find?(options : Hash(String, Any), include_deleted : Bool = false, include_undone : Bool = false) forall Any
Finds the saved instance.
-
#find?(include_deleted : Bool = false, include_undone : Bool = false, **options)
Finds the saved instance.
- #persistent_columns
-
#scalar(query : String, args : Array | Nil = nil)
Runs the query.
-
#scalar(query : String, *args_)
Runs the query.
-
#sql(query : String, *arguments)
Runs the query.
- #table(as_name = nil)
-
#table_name
Returns the table name.
- #values(options : Hash(String, Any) | Nil = nil, **options_) forall Any
-
#where(options : Hash(String, Any), include_deleted : Bool = false, include_undone : Bool = false) forall Any
Returns saved instances.
-
#where(where : String, *arguments, include_deleted : Bool = false, include_undone : Bool = false)
Returns saved instances.
-
#where(include_deleted : Bool = false, include_undone : Bool = false, **options)
Returns saved instances.
Instance Method Detail
Returns all instances.
Returns the count of saved instances.
Returns the count of saved instances.
Runs the query.
Returns the number of rows affected.
Finds the saved instance.
Raises NotFound
if no such saved instance exists.
Finds the saved instance.
Raises NotFound
if no such saved instance exists.
Finds the saved instance.
Raises NotFound
if no such saved instance exists.
Finds the saved instance.
Returns nil
if no such saved instance exists.
Finds the saved instance.
Returns nil
if no such saved instance exists.
Finds the saved instance.
Returns nil
if no such saved instance exists.
Runs the query.
Returns the result.
Returns saved instances.
Returns saved instances.
Returns saved instances.