https://github.com/functionalfoundry/entitydb
Simple database for entities defined with workflo/macros
https://github.com/functionalfoundry/entitydb
Last synced: 17 days ago
JSON representation
Simple database for entities defined with workflo/macros
- Host: GitHub
- URL: https://github.com/functionalfoundry/entitydb
- Owner: functionalfoundry
- Created: 2017-07-03T14:46:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-05T21:32:01.000Z (over 8 years ago)
- Last Synced: 2025-09-27T20:47:24.174Z (9 months ago)
- Language: Clojure
- Homepage: http://functionalfoundry.github.io/entitydb
- Size: 135 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# workflo/entitydb
[](https://clojars.org/workflo/entitydb)
[](https://travis-ci.org/functionalfoundry/entitydb)
[API docs](https://functionalfoundry.github.io/entitydb/)
**NOTE: Everything here is considered work in progress and subject to change.**
Database for entities defined with `defentity` from `workflo/macros`.
## Database format
The database format is defined with the `workflo.entitydb.specs.v1/entitydb`
spec. An `entitydb` database is structured as follows:
```
{;; Actual database content
:workflo.entitydb.v1/data
{ {
...}
...}
;; Indexes
:workflo.entitydb.v1/indexes
{
...}}
```
where `:workflo.entitydb.v1/indexes` is entirely optional.
**NOTE: There is no support for indexes yet. We will work out a concept
soon.**
A specific database with two `:team` and `:user` entities might look
like this:
```
{:workflo.entitydb.v1/data
{:user {"596e2b0e7ca846ed9508775ebe6f3541"
{:workflo/id "596e2b0e7ca846ed9508775ebe6f3541"
:user/name "Joe"
:user/email "joe@email.com"}
"596e2b0e9b814772aabf6a997273b3ed"
{:workflo/id "596e2b0e9b814772aabf6a997273b3ed"
:user/name "Linda"
:user/email "linda@email.com"}}
:team {"596e2b0e679e46aea7388db22ccd4b57"
{:workflo/id "596e2b0e679e46aea7388db22ccd4b57"
:team/name "Team Alpha"
:team/members #{{:workflo/id "596e2b0e7ca846ed9508775ebe6f3541"}
{:workflo/id "596e2b0e9b814772aabf6a997273b3ed"}}}}}}}
```
## Testing
1. Install [boot](http://boot-clj.com/)
1. Clone this repository
2. Run the tests:
- `boot test` to run tests once
- `boot watch test` to run tests continuously on changes
## Copyright
This project is licensed under the [MIT license](https://mit-license.org/).
Copyright © 2017 Workflo, Inc.