query

package
v0.0.0-...-d2438c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	api.DefaultService
	// contains filtered or unexported fields
}

API defines a query API

func NewAPI

func NewAPI(name string) *API

NewAPI creates a API with sane defaults

func (*API) Name

func (a *API) Name() string

Name returns the API name

func (*API) Post

func (a *API) Post(ctx context.Context, req *http.Request) api.Response

Post defines a service for calling "POST" method and returns a response.

type Batch

type Batch struct {
	Results []Result `json:"results" yaml:"results"`
}

Batch represents a marshalled object for batched query results

type Query

type Query struct {
	Database string `json:"database" yaml:"database"`
	Query    string `json:"query" yaml:"query"`
}

Query represents a marshalled object for query information

type Result

type Result struct {
	Type         string          `json:"type" yaml:"type"`
	Columns      []string        `json:"columns" yaml:"columns"`
	Rows         [][]interface{} `json:"rows" yaml:"rows"`
	RowsAffected int64           `json:"rows_affected" yaml:"rows_affected"`
}

Result represents a marshalled result object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL