Git Product home page Git Product logo

voltdbgo's Introduction

voltdbclient

VoltDB driver for Google go (golang)

See api.go for usage hints. There are some client examples in the example direcory.

This driver was largely written for fun and is still relatively incomplete. See below for some of the more important missing parts.

Using the driver

The driver connects to a running VoltDB database node and calls procedures. The simplest example, omitting correct error handling, is:

func main() {
    volt, _ := voltdb.NewConnection("username", "", "localhost:21212")
    response, _ := volt.Call("@AdHoc", "select * from store order by Key limit 3;");
    type Row struct {
        Key string
        Value string
    }
    var row Row
    for response.Table(0).HasNext() {
        response.Table(0).Next(&row)
        fmt.Printf("Row: %v %v\n", row.Key, row.Value)
    }
}

Examples

There are a few examples in github.com/rbetts/voltdbgo/cmds.

Missing

The driver supports invoking stored procedures and reading responses. However, there are several serializations that are not yet implemented.

  • Exception deserialization in responses not supported.
  • VARBINARY not supported
  • DECIMAL not supported
  • Creation of serialized VoltTables is not supported.
  • Arrays as stored procedure parameters not supported.
  • SQL NULL is not supported.

There are missing api methods.

  • There is no way to reset the table iterator.

There are missing components expected for a production client:

  • The client doesn't reconnect closed sockets.
  • The client doesn't provide a high level interface to connect to multiple nodes of a VoltDB database.

Row deserialization could be substantially more flexible. It would be nice to allow tagged field names to specify columns (instead of requiring the struct fields to be in column-order).

voltdbgo's People

Contributors

rbetts avatar martinhpedersen avatar

Watchers

 avatar

Forkers

devopstaku

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.