PhaseDB
A real-time time series database.
Installation
PhaseDB is available as a hex package:
Add phasedb to your list of dependencies in
mix.exs:def deps do
[{:phasedb, "~> 0.0.1"}]end
Ensure phasedb is started before your application:
def application do
[applications: [:phasedb]]end
Status
PhaseDB is in very early development.
Examples
Creating a database.
alias PhaseDB.Database
"foo"
|> Database.createCreating a series.
alias PhaseDB.{Database, Series}
"foo"
|> Database.get
|> Series.create("bar")Inserting data
alias PhaseDB.Query
import PhaseDB.Insert
use Calendar
insert
|> value(13)
|> recorded_at(DateTime.now_utc)
|> into("foo", "bar")
|> Query.executeQuerying data
alias PhaseDB.Query
import PhaseDB.Select
select
|> function(:average, [field(:value)], as: :value)
|> field(:received_at)
|> from("foo", "bar")
|> group_by(20, :mins)
|> Query.executeDocumentation
Full API documentation is available on hexdocs.pm
Running the tests
PhaseDB uses espec for unit tests and white_bread for acceptance tests.
$ mix deps.get
$ mix espec
$ mix white_bread.runContributing
- Fork it ( https://github.com/jamesotron/phasedb/fork )
-
Create your feature branch (
git checkout -b my-new-feature) -
Commit your changes (
git commit -am 'Add some feature') -
Push to the branch (
git push origin my-new-feature) - Create a new Pull Request%