{"id":13508834,"url":"https://github.com/skovsgaard/exleveldb","last_synced_at":"2026-03-08T21:02:16.580Z","repository":{"id":21245329,"uuid":"24560778","full_name":"skovsgaard/exleveldb","owner":"skovsgaard","description":"Elixir wrapper around the Erlang module, eleveldb.","archived":false,"fork":false,"pushed_at":"2018-09-25T17:46:48.000Z","size":82,"stargazers_count":43,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-21T16:43:10.948Z","etag":null,"topics":["elixir","leveldb"],"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/skovsgaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-28T14:01:08.000Z","updated_at":"2025-07-24T10:52:33.000Z","dependencies_parsed_at":"2022-09-12T10:20:23.617Z","dependency_job_id":null,"html_url":"https://github.com/skovsgaard/exleveldb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/skovsgaard/exleveldb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovsgaard%2Fexleveldb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovsgaard%2Fexleveldb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovsgaard%2Fexleveldb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovsgaard%2Fexleveldb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skovsgaard","download_url":"https://codeload.github.com/skovsgaard/exleveldb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovsgaard%2Fexleveldb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30273292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elixir","leveldb"],"created_at":"2024-08-01T02:00:59.182Z","updated_at":"2026-03-08T21:02:16.329Z","avatar_url":"https://github.com/skovsgaard.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"Exleveldb\n=========\n\n[![Apache Licensed](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/skovsgaard/exleveldb/blob/master/LICENSE)\n[![Hex Version](http://img.shields.io/hexpm/v/exleveldb.svg?style=flat-square)](https://hex.pm/packages/exleveldb)\n\nThis is an Elixir module wrapping the functions exposed by the Erlang module, [eleveldb](https://github.com/basho/eleveldb).\n\n## Usage\n\nAlso available at [hexdocs.pm/exleveldb](http://hexdocs.pm/exleveldb/)\n\n### open/2\nOpens a new datastore in the directory called `name`. If `name` does not exist already and no `opts` list was provided, `opts` will default to `[{:create_if_missing, :true}]`.\n\nReturns `{:ok, \"\"}` where the empty string is a reference to the opened datastore or, on error, `{:error, {:type, 'reason for error'}}`.\n\nThe reference to the database appears to be an empty binary but isn't. This is because `db_ref` is defined as an opaque type in eleveldb.\n\nThe best way to use the reference is to pattern match on the pair returned by `open/2` and keep the value for use with functions that take a `db_ref`.\n\n### close/1\nTakes a reference as returned by `open/2` and closes the specified datastore if open.\n\nReturns `:ok` or `{:error, {:type, 'reason for error'}}` on error.\n\n### get/3\nRetrieves a value in LevelDB by key. Takes a reference as returned by `open/2`, a key, and an options list.\n\nReturns `{:ok, value}` when successful or `:not_found` on failed lookup.\n\n### put/4\nPuts a single key-value pair into the datastore specified by the reference, `db_ref`.\n\nReturns `:ok` if successful or `{:error, reference {:type, action}}` on error.\n\n### delete/3\nDeletes the value associated with `key` in the datastore, `db_ref`.\n\nReturns `:ok` when successful or `{:error, reference, {:type, action}}` on error.\n\n### is\\_empty?/1\nChecks whether the datastore specified by `db_ref` is empty and returns a boolean.\n\n### fold/4\nFolds over the key-value pairs in the datastore specified in `db_ref`.\n\nReturns the result of the last call to the anonymous function used in the fold.\n\nThe two arguments passed to the anonymous function, `fun` are a tuple of the key value pair and `acc`.\n\n### fold\\_keys/4\nFolds over the keys of the open datastore specified by `db_ref`.\n\nReturns the result of the last call to the anonymous function used in the fold.\n\nThe two arguments passed to the anonymous function, `fun` are a key and `acc`.\n\n### map/2\nTakes a reference as returned by `open/2` and an anonymous function,\nand maps over the key-value pairs in the datastore.\n\nReturns the results of applying the anonymous function to\nevery key-value pair currently in the datastore.\n\nThe argument to the anonymous function is `i` for the current item,\ni.e. key-value pair, in the list.\n\n### map_keys/2\nTakes a reference as returned by `open/2` and an anonymous function,\nand maps over the keys in the datastore.\n\nReturns the results of applying the anonymous function to\nevery key in currently in the datastore.\n\nThe argument to the anonymous function is `i` for the current item,\ni..e key, in the list.\n\n### stream/1\nTakes a reference as returned by `open/2`,\nand constructs a stream of all key-value pairs in the referenced datastore.\n\nReturns a `Stream` struct with the datastore's key-value pairs as its enumerable.\n\nWhen calling `Enum.take/2` or similar on the resulting stream,\nspecifying more entries than are in the referenced datastore\nwill not yield an error but simply return a list of all pairs in the datastore.\n\n### stream_keys/1\nTakes a reference as returned by `open/2`,\nand constructs a stream of all the keys in the referenced datastore.\n\nReturns a `Stream` struct with the datastore's keys as its enum field.\n\nWhen calling `Enum.take/2` or similar on the resulting stream,\nspecifying more entries than are in the referenced datastore\nwill not yield an error but simply return a list of all pairs in the datastore.\n\n### destroy/2\nRemove a database, which implies that the database folder is deleted. Before calling `destroy/2` the database has to be closed with `close/1`. Returns `:ok` on success and `{:type, 'reason for error'}` on error.\n\n### repair/2\nThis function takes the path to the leveldb database and a list of options. The standard recomended option is the empty list `[]`.\nBefore calling `repair/2`, close the connection to the database with `close/1`.\nReturns `:ok` on success and `{:type, 'reason for error'}` on error.\n\n### write/3\nPerforms a batch write to the datastore, either deleting or putting key-value pairs.\n\nTakes a reference to an open datastore, a list of tuples (containing atoms for operations and strings for keys and values) designating operations (delete or put) to be done, and a list of options.\n\nReturns `:ok` on success and `{:error, reference, {:type, reason}}` on error.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovsgaard%2Fexleveldb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskovsgaard%2Fexleveldb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovsgaard%2Fexleveldb/lists"}