queries

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: BSD-2-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuery

func NewQuery(
	name,
	optionsJSON,
	description,
	query string,
	id,
	dataSourceID,
	repeated,
	version int64,
	isDraft bool) (
	*models.Query,
	error)

NewQuery builds a Query object. The only validation this methods provides is that options argument is a valid json string

Types

type RequestWrapper

type RequestWrapper struct {
	// contains filtered or unexported fields
}

func NewRequestWrapper

func NewRequestWrapper(httpClient *client.Redashclient, opts ...queries.ClientOption) *RequestWrapper

func (*RequestWrapper) Add

func (requestWrapper *RequestWrapper) Add(query *models.Query) (*models.Query, error)

Add adds a new query

func (*RequestWrapper) Archive

func (requestWrapper *RequestWrapper) Archive(queryID int64) error

Archive query by ID

func (*RequestWrapper) ExecuteQuery

func (requestWrapper *RequestWrapper) ExecuteQuery(queryID int64) error

Run executes the query, but does not check for the return value

func (*RequestWrapper) Get

func (requestWrapper *RequestWrapper) Get(queryID int64) (*models.Query, error)

Get a specific query with by query ID

func (*RequestWrapper) GetResult

func (requestWrapper *RequestWrapper) GetResult(queryID int64) (*models.QueryResult, error)

Get result of query by ID

func (*RequestWrapper) List

func (requestWrapper *RequestWrapper) List() (*models.QueryList, error)

List all queries

func (*RequestWrapper) Publish

func (requestWrapper *RequestWrapper) Publish(queryID int64) (*models.Query, error)

Publish sets the query's status as published

func (*RequestWrapper) RegenerateQueryAPIKey

func (requestWrapper *RequestWrapper) RegenerateQueryAPIKey(queryID int64) error

RegenerateQueryAPIKey changes the query's API key, thus invalidating all existing query URLs

Jump to

Keyboard shortcuts

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