Popularity
2.3
Declining
Activity
0.0
Stable
8
2
5
Monthly Downloads: 234
Programming language: Elixir
License: Apache License 2.0
Tags:
ORM And Datamapping
mysqlex alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view mysqlex 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. -
ecto_psql_extras
Ecto PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
* 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 mysqlex or a related project?
Popular Comparisons
README
Mysqlex
This is a wrapper around a newer mysql library for erlang:
There are benchmarks for the mysql drivers:
- http://tjheeta.github.io/2015/05/31/elixir-and-erlang-mysql-drivers.html
- http://tjheeta.github.io/2015/05/30/benchmarking-elixir-postgres-mysql-ecto.html
Usage
To use add the following to your mix.exs:
def deps do
[{:mysqlex, github: "tjheeta/mysqlex" } ]
end
Profit:
iex(8)> {:ok, pid} = Mysqlex.Connection.start_link(username: "test", database: "test", password: "test", hostname: "10.0.3.82")
{:ok, #PID<0.1420.0>}
iex(9)> Mysqlex.Connection.query(pid, "CREATE TABLE posts (id serial, title text)")
{:ok,
%Mysqlex.Result{columns: [], command: :create, last_insert_id: 0, num_rows: 0,
rows: []}}
iex(10)> Mysqlex.Connection.query(pid, "CREATE TABLE posts (id serial, title text)")
{:error,
%Mysqlex.Error{message: "1050 - Table 'posts' already exists", mysqlex: nil}}
iex(11)> Mysqlex.Connection.query(pid, "INSERT INTO posts (title) VALUES ('my title')")
{:ok,
%Mysqlex.Result{columns: [], command: :insert, last_insert_id: 1, num_rows: 1,
rows: []}}
iex(12)> Mysqlex.Connection.query(pid, "SELECT title FROM posts", [])
{:ok,
%Mysqlex.Result{columns: ["title"], command: :select, last_insert_id: nil,
num_rows: 1, rows: [{"my title"}]}}
iex(13)> Mysqlex.Connection.query(pid, "SELECT id FROM posts WHERE title like ?", ["%my%"])
{:ok,
%Mysqlex.Result{columns: ["id"], command: :select, last_insert_id: nil,
num_rows: 1, rows: [{1}]}}
To use with ecto, you'll have to patch it for now: