dlex v0.3.2 Dlex.Repo
Ecto-like repository, which allows to embed the schema
defmodule Repo do
use Dlex.Repo, otp_app: :my_app, modules: [User]
end
config :my_app, Repo,
hostname: "localhost",
port: 3306
Link to this section Summary
Functions
Query all
Alter schema for modules
Build or update lookup map from module list
Get by uid
The same as get/3
, but return result or raises.
Mutate data
The same as mutate/2
, but return result of sucessful operation or raises.
The same as mutate
.
The same as mutate!
.
Generate snapshot for running meta process
Link to this section Functions
Link to this function
all(conn, query)
Query all
Link to this function
alter_schema(conn, snapshot)
Alter schema for modules
Link to this function
build_lookup_map(lookup_map \\ %{}, modules)
Build or update lookup map from module list
Link to this function
encode(data)
Link to this function
field(struct, key)
Link to this function
get(conn, map, uid)
Get by uid
Link to this function
get!(conn, meta, uid)
The same as get/3
, but return result or raises.
Link to this function
get_by(conn, field, name)
Link to this function
mutate(conn, data, opts)
Mutate data
Link to this function
mutate!(conn, data, opts)
The same as mutate/2
, but return result of sucessful operation or raises.
Link to this function
set(conn, data, opts)
The same as mutate
.
Link to this function
set!(conn, data, opts)
The same as mutate!
.
Link to this function
snapshot(meta)
Generate snapshot for running meta process
Link to this function