Giter VIP home page Giter VIP logo

module-go-siridb's Introduction

SiriDB ThingsDB Module (Go)

SiriDB module written using the Go language.

Installation

Install the module by running the following command in the @thingsdb scope:

new_module('siridb', 'github.com/thingsdb/module-go-siridb');

Optionally, you can choose a specific version by adding a @ followed with the release tag. For example: @v0.1.0.

Configuration

The SiriDB module requires a thing a configuration with the following properties:

Property Type Description
username str (required) Database user to authenticate with.
password str (required) Password for the database user.
database str (required) Database to connect to.
servers list (required) List with tuples containing the host and client port. e.g. [["siridb.local", 9000]].

Note: if you have multiple SiriDB databases, then install one SiriDB module for each database.

Example configuration:

set_module_conf('siridb', {
    username: 'iris',
    password: 'siri',
    database: 'dbtest',
    servers: [
        ["localhost", 9000]
    ]
});

Exposed functions

Name Description
query Run a SiriDB query.
insert Insert data into SiriDB.

query

Syntax: query(query_string)

Arguments

  • query_string: The query string to run.

Example:

siridb.query("select * from 'my-series-001'").then(|res| {
    res;  // just return the response.
});

insert

Syntax: insert(data)

Arguments

  • data: Thing with series and data points to insert.

Example:

data = {
    mySeries001: [
        [int(now()), 3.14]
    ]
};
siridb.insert(data);

module-go-siridb's People

Contributors

joente 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.