{"id":16342641,"url":"https://github.com/mrshankly/aqlc","last_synced_at":"2025-11-05T14:30:25.100Z","repository":{"id":57478972,"uuid":"300695133","full_name":"mrshankly/aqlc","owner":"mrshankly","description":"Erlang client for AntidoteDB's SQL interface (AQL)","archived":false,"fork":false,"pushed_at":"2021-04-03T21:41:16.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T13:40:16.551Z","etag":null,"topics":["antidote","aql","erlang"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrshankly.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-10-02T17:53:36.000Z","updated_at":"2021-04-03T21:41:18.000Z","dependencies_parsed_at":"2022-09-17T04:31:55.038Z","dependency_job_id":null,"html_url":"https://github.com/mrshankly/aqlc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrshankly%2Faqlc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrshankly%2Faqlc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrshankly%2Faqlc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrshankly%2Faqlc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrshankly","download_url":"https://codeload.github.com/mrshankly/aqlc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239461190,"owners_count":19642535,"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":["antidote","aql","erlang"],"created_at":"2024-10-11T00:04:39.728Z","updated_at":"2025-11-05T14:30:24.913Z","avatar_url":"https://github.com/mrshankly.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"aqlc\n====\n\n[![CI](https://github.com/mrshankly/aqlc/workflows/CI/badge.svg)](https://github.com/mrshankly/aqlc/actions?query=workflow%3ACI)\n[![Hex.pm](https://img.shields.io/hexpm/v/aqlc)](https://hex.pm/packages/aqlc)\n\nErlang client for AntidoteDB's SQL interface (AQL). You will need at least\nErlang/OTP 22.0, this library won't compile in previous versions.\n\n# Quick Start\n\n### Connecting to the server\n\nAssuming you have at least one AQL node running, you can connect to it with\n`aqlc:connect/2`:\n\n```erlang\nConn = aqlc:connect(\"127.0.0.1\", 8321).\n```\n\nOnce done, you should close the connection with `aqlc:close/1`:\n\n```erlang\naqlc:close(Conn).\n```\n\nFor instructions on how to launch AQL and AntidoteDB instances, check the\ndocumentation [here](https://antidotedb.gitbook.io/documentation/) and\n[here](https://github.com/mrshankly/secure-aql).\n\n### Queries\n\nTo issue queries, use the `aqlc:query/2` function:\n\n```erlang\nCreateTable = \"CREATE UPDATE-WINS TABLE Artist (ArtistID INT PRIMARY KEY, Name VARCHAR);\".\naqlc:query(Conn, CreateTable).\n\naqlc:query(Conn, \"INSERT INTO Artist (ArtistID, Name) VALUES (42, 'Joee');\").\n\naqlc:query(Conn, \"SELECT * FROM Artist WHERE ArtistID = 42;\").\n```\n\n### Transactions\n\n`aqlc:query/2` runs the given query in a single transaction. To run multiple\nqueries in a single transaction use `aqlc:start_transaction/1` and\n`aqlc:query/3`:\n\n```erlang\nTx = aqlc:start_transaction(Conn).\naqlc:query(Conn, \"UPDATE Artist SET Name = 'Joe' WHERE ArtistID = 42;\", Tx).\naqlc:query(Conn, \"SELECT * FROM Artist WHERE ArtistID = 42;\", Tx).\n```\n\nYou may commit a transaction with `aqlc:commit_transaction/2`:\n\n```erlang\naqlc:commit_transaction(Conn, Tx).\n```\n\nOr abort it with `aqlc:abort_transaction/2`:\n\n```erlang\naqlc:abort_transaction(Conn, Tx).\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshankly%2Faqlc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrshankly%2Faqlc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshankly%2Faqlc/lists"}