CQL API
Schema Definition
CQL::Schema.define
MyDB = CQL::Schema.define(
:my_db,
adapter: CQL::Adapter::SQLite,
uri: "sqlite3://./db/development.db"
) do
table :users do
primary :id, Int64
column :name, String
column :email, String
timestamps
end
endAdapters
Available Adapters
Adapter
URI Format
Table Definition
table
primary
column
timestamps
foreign_key
index
Model Definition
CQL::Model
db_context
CRUD Operations
create
find
find_by
save
update
destroy
delete_all
Query Methods
all
where
order
limit / offset
count
first / last
exists?
Associations
belongs_to
has_many
has_one
Callbacks
Available Callbacks
Scopes
Transactions
Raw Queries
See Also
Last updated
Was this helpful?
