The implementation of Immudb client in Elixir.
def deps do
[
{:immudb_elixir, "~> 0.2.0"}
]
end
You can connect to Immudb in 2 ways
{:ok, immudb} = Immudb.new(
host: host,
port: port,
username: username,
password: password,
database: database
)
{:ok, immudb} = Immudb.new(
url: "immudb://user:pass@host:port/dbname"
)
Set key and value
immudb
|> Immudb.set("Hello", "World")
Get value from key
immudb
|> Immudb.get("Hello")
Set with verification
immudb
|> Immudb.verified_set("Hello", "World")
Get with verification
immudb
|> Immudb.verified_get("Hello")
Execute sql (create, insert)
immudb
|> Immudb.sql_exec("CREATE TABLE hello (id INTEGER, name VARCHAR, PRIMARY KEY id)")
immudb
|> Immudb.sql_exec("INSERT INTO hello (id, name) VALUES (@id, @name)", %{id: 1, name: "World"})
Query table
immudb
|> Immudb.sql_query("SELECT * FROM hello WHERE id == @id", %{id: 1})
- update_auth_config
- update_mtls_config
- exec_all
- z_add
- verifiable_z_add
- z_scan
- stream
- Test sql command
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.