query: Query

Description Arguments Examples

Description

Query SiriDB
Requires a string containing the query and a callback function to catch the result.

Arguments

query

A string containing the query

callback

A callback function to catch the result.
The callback function will be called with two arguments:

  1. A response Object

  2. Number indicating the status. The status is 0 when successful or a negative value in case of an error. (see Status codes for the possible status codes)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  s <- SiriDB(user="iris", password="siri", dbname="dbtest", server="localhost", port=9000L)
  s$connect(function (err) {
    if (is.null(err)) {
      s$query("show", function (resp, status) {
        # do something with response

        # close the connection
        s$close()
      })
    }
  })

SiriDB/siridb-connector-r documentation built on May 5, 2019, 9:44 p.m.