{"id":13508864,"url":"https://github.com/xerions/mariaex","last_synced_at":"2025-10-21T19:02:30.220Z","repository":{"id":24341456,"uuid":"27739217","full_name":"xerions/mariaex","owner":"xerions","description":"Pure Elixir database driver for MariaDB / MySQL","archived":false,"fork":false,"pushed_at":"2021-12-09T23:29:29.000Z","size":529,"stargazers_count":261,"open_issues_count":58,"forks_count":89,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-05-09T13:50:49.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xerions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-08T22:54:56.000Z","updated_at":"2024-02-28T05:20:51.000Z","dependencies_parsed_at":"2022-06-26T04:02:46.740Z","dependency_job_id":null,"html_url":"https://github.com/xerions/mariaex","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmariaex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmariaex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmariaex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmariaex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xerions","download_url":"https://codeload.github.com/xerions/mariaex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314012,"owners_count":20757454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:59.616Z","updated_at":"2025-10-21T19:02:30.121Z","avatar_url":"https://github.com/xerions.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"Mariaex [![Build Status](https://travis-ci.org/xerions/mariaex.svg)](https://travis-ci.org/xerions/mariaex) [![Coverage Status](https://coveralls.io/repos/xerions/mariaex/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/xerions/mariaex?branch=master) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/xerions/mariaex.svg)](https://beta.hexfaktor.org/github/xerions/mariaex)\n=======\n\n## Usage\n\nAdd Mariaex as a dependency in your `mix.exs` file.\n\n```elixir\ndef deps do\n  [{:mariaex, \"~\u003e 0.8.2\"} ]\nend\n```\n\nAfter you are done, run `mix deps.get` in your shell to fetch and compile Mariaex. Start an interactive Elixir shell with `iex -S mix`.\n\n```elixir\n  iex(1)\u003e {:ok, p} = Mariaex.start_link(username: \"ecto\", database: \"ecto_test\")\n  {:ok, #PID\u003c0.108.0\u003e}\n\n  iex(2)\u003e Mariaex.query(p, \"CREATE TABLE test1 (id serial, title text)\")\n  {:ok, %Mariaex.Result{columns: [], command: :create, num_rows: 0, rows: []}}\n\n  iex(3)\u003e Mariaex.query(p, \"INSERT INTO test1 VALUES(1, 'test')\")\n  {:ok, %Mariaex.Result{columns: [], command: :insert, num_rows: 1, rows: []}}\n\n  iex(4)\u003e Mariaex.query(p, \"INSERT INTO test1 VALUES(2, 'test2')\")\n  {:ok, %Mariaex.Result{columns: [], command: :insert, num_rows: 1, rows: []}}\n\n  iex(5)\u003e Mariaex.query(p, \"SELECT id, title FROM test1\")\n  {:ok,\n   %Mariaex.Result{columns: [\"id\", \"title\"], command: :select, num_rows: 2,\n    rows: [[1, \"test\"], [2, \"test2\"]}}\n```\n\n## Configuration\n\nImportant configuration, which depends on used charset for support unicode chars, see `:binary_as`\nin `Mariaex.start_link/1`\n\n### JSON library\n\nAs default, [Poison](https://github.com/devinus/poison) is used for JSON library in mariaex to support JSON column.\n\nIf you want to use another library, please set `config.exs` like below.\n\n```elixir\nconfig :mariaex, json_library: SomeLibrary\n```\n=======\n## Data representation\n\n    MySQL                 Elixir\n    ----------            ------\n    NULL                  nil\n    TINYINT               42\n    INT                   42\n    BIGINT                42\n    FLOAT                 42.0\n    DOUBLE                42.0\n    DECIMAL               #Decimal\u003c42.0\u003e *\n    VARCHAR               \"eric\"\n    TEXT                  \"eric\"\n    BLOB                  \u003c\u003c42\u003e\u003e\n    DATE                  %Date{year: 2013, month: 10, day: 12}\n    TIME                  %Time{hour: 0, minute: 37, second: 14} **\n    YEAR                  2013\n    DATETIME              %DateTime{year: 2013 month: 10, day: 12, hour: 0, minute: 37, second: 14} **\n    TIMESTAMP             %DateTime{year: 2013 month: 10, day: 12, hour: 0, minute: 37, second: 14} **\n    BIT                   \u003c\u003c 1 \u003e\u003e\n    GEOMETRY/POINT        %Mariaex.Geometry.Point{coordinates: {1.0, -1.0}, srid: 42}\n    GEOMETRY/LINESTRING   %Mariaex.Geometry.LineString{coordinates: [{0.0, 0.0}, {10.0, 10.0}, {20.0, 25.0}, {50.0, 60.0}], srid: 0}\n    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}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerions%2Fmariaex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxerions%2Fmariaex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerions%2Fmariaex/lists"}