GithubHelp home page GithubHelp logo

btkostner / timescale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davydog187/timescale

1.0 1.0 0.0 31 KB

TimescaleDB made easy with Ecto

Home Page: https://hexdocs.pm/timescale/Timescale.html

License: Apache License 2.0

Elixir 100.00%

timescale's Introduction

Timescale

Build Status Hex pm Hexdocs.pm

Extends the Ecto DSL for easily working with TimescaleDB. Already using Ecto and Postgres? Great, you're all set to start working with time-series data.

Features

Adding the TimescaleDB extension

  1. Make sure your database has Timescale correctly installed
  2. Create a new Ecto migration
  3. Call the add_timescaledb_extension/0 and drop_timescaledb_extension/0 in your migration

E.g.

defmodule MyApp.Repo.Migrations.SetupTimescale do
  use Ecto.Migration

  import Timescale.Migration

  def up do
    add_timescaledb_extension()
  end

  def down do
    drop_timescaledb_extension()
  end
end

Installation

If available in Hex, the package can be installed by adding timescale to your list of dependencies in mix.exs:

def deps do
  [
    {:timescale, "~> 0.1.0"}
  ]
end

Built by Bitfo

Installing Postgres / TimescaleDB on MacOS

There are many ways to install PostgreSQL locally, including Postgres.app, Docker, and building locally. Below is how to install through Homebrew

First, install Postgres

$ brew install postgresql
$ sudo chown $(whoami) /usr/local/var/postgres
$ initdb /usrl/local/var/postgres
$ createuser -s postgres
$ createdb

Make Postgres a service that is started automatically

$ brew services start postgresql

Then install Timescaledb

$ brew tap timescaledb/tap
$ brew install timescaledb

# Add the following to `/opt/homebrew/var/postgres/postgresql.conf`
shared_preload_libraries = 'timescaledb'

timescale's People

Contributors

davydog187 avatar doomspork avatar akoutmos avatar

Stargazers

Roman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.