https://github.com/iboard/axrepo
Simple repository for Altex projects
https://github.com/iboard/axrepo
Last synced: about 1 year 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 (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T08:03:12.000Z (about 4 years ago)
- Last Synced: 2025-04-04T08:08:48.259Z (about 1 year 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
[](http://hexdocs.pm/axrepo/)
[](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)
```