Create Models
Basic Model
class User
include CQL::Model(User, Int64)
db_context AcmeDB, :users
property id : Int64?
property name : String
property email : String
property created_at : Time?
property updated_at : Time?
def initialize(@name = "", @email = "")
end
endModel with Validations
Associations
Belongs To
Has Many
Has One
Many to Many
Callbacks
Scopes
Custom Methods
JSON Serialization
See Also
Last updated
Was this helpful?
