mariaex alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view mariaex alternatives based on common mentions on social networks and blogs.
-
paper_trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history. -
ExAudit
Ecto auditing library that transparently tracks changes and can revert them. -
ecto_psql_extras
Ecto PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more. -
arbor
Ecto elixir adjacency list and tree traversal. Supports Ecto versions 2 and 3. -
sqlitex
An Elixir wrapper around esqlite. Allows access to sqlite3 databases. -
boltun
Transforms notifications from the Postgres LISTEN/NOTIFY mechanism into callback execution -
sql_dust
Easy. Simple. Powerful. Generate (complex) SQL queries using magical Elixir SQL dust.
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of mariaex or a related project?
Popular Comparisons
README
Mariaex
Usage
Add Mariaex as a dependency in your mix.exs
file.
def deps do
[{:mariaex, "~> 0.8.2"} ]
end
After you are done, run mix deps.get
in your shell to fetch and compile Mariaex. Start an interactive Elixir shell with iex -S mix
.
iex(1)> {:ok, p} = Mariaex.start_link(username: "ecto", database: "ecto_test")
{:ok, #PID<0.108.0>}
iex(2)> Mariaex.query(p, "CREATE TABLE test1 (id serial, title text)")
{:ok, %Mariaex.Result{columns: [], command: :create, num_rows: 0, rows: []}}
iex(3)> Mariaex.query(p, "INSERT INTO test1 VALUES(1, 'test')")
{:ok, %Mariaex.Result{columns: [], command: :insert, num_rows: 1, rows: []}}
iex(4)> Mariaex.query(p, "INSERT INTO test1 VALUES(2, 'test2')")
{:ok, %Mariaex.Result{columns: [], command: :insert, num_rows: 1, rows: []}}
iex(5)> Mariaex.query(p, "SELECT id, title FROM test1")
{:ok,
%Mariaex.Result{columns: ["id", "title"], command: :select, num_rows: 2,
rows: [[1, "test"], [2, "test2"]}}
Configuration
Important configuration, which depends on used charset for support unicode chars, see :binary_as
in Mariaex.start_link/1
JSON library
As default, Poison is used for JSON library in mariaex to support JSON column.
If you want to use another library, please set config.exs
like below.
config :mariaex, json_library: SomeLibrary
=======
Data representation
MySQL Elixir
---------- ------
NULL nil
TINYINT 42
INT 42
BIGINT 42
FLOAT 42.0
DOUBLE 42.0
DECIMAL #Decimal<42.0> *
VARCHAR "eric"
TEXT "eric"
BLOB <<42>>
DATE %Date{year: 2013, month: 10, day: 12}
TIME %Time{hour: 0, minute: 37, second: 14} **
YEAR 2013
DATETIME %DateTime{year: 2013 month: 10, day: 12, hour: 0, minute: 37, second: 14} **
TIMESTAMP %DateTime{year: 2013 month: 10, day: 12, hour: 0, minute: 37, second: 14} **
BIT << 1 >>
GEOMETRY/POINT %Mariaex.Geometry.Point{coordinates: {1.0, -1.0}, srid: 42}
GEOMETRY/LINESTRING %Mariaex.Geometry.LineString{coordinates: [{0.0, 0.0}, {10.0, 10.0}, {20.0, 25.0}, {50.0, 60.0}], srid: 0}
GEOMETRY/POLYGON %Mariaex.Geometry.Polygon{coordinates: [[{0.0, 0.0}, {10.0, 0.0}, {10.0, 10.0}, {0.0, 10.0}, {0.0, 0.0}], [{5.0, 5.0}, {7.0, 5.0}, {7.0, 7.0}, {5.0, 7.0}, {5.0, 5.0}]], srid: 0}