Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iboard/axrepo
Simple repository for Altex projects
https://github.com/iboard/axrepo
Last synced: 16 days ago
JSON representation
Simple repository for Altex projects
- Host: GitHub
- URL: https://github.com/iboard/axrepo
- Owner: iboard
- License: mit
- Created: 2021-12-14T18:12:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T08:03:12.000Z (over 2 years ago)
- Last Synced: 2024-12-12T10:48:44.303Z (22 days ago)
- Language: Elixir
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# README – Altex.Repo
[![Documentation](https://img.shields.io/badge/docs-hexpm-blue.svg)](http://hexdocs.pm/axrepo/)
[![Elixir CI](https://github.com/iboard/axrepo/actions/workflows/elixir.yml/badge.svg)](https://github.com/iboard/axrepo/actions/workflows/elixir.yml)A Repository for the "Altex Mix Projects".
## Installation
[Available in Hex](https://hex.pm/packages/axrepo), the package can be installed
by adding `axrepo` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:axrepo, "~> 0.1"}
]
end
```## Configuration
Configure the data path in your `config/.exs`
config: :axrepo, :dets_path, "../wherever/your/data/are"
## Usage
```elixir
alias Altex.{Entity, Repo}Repo.start_repo(:people)
{:ok, bob} = %{ name: "Bob", age: 57 }
|> Entity.init()
|> Repo.store(:people){:ok, ^bob} = Repo.load(:people, bob.id)
%{ bob | age: bob.age + 1 } |> Repo.store(:people)
```