skl

package
v0.0.0-...-49e565d Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DateFormat represents the format for date literals.
	DateFormat = "2006-01-02"

	// DateTimeFormat represents the format for date time literals.
	DateTimeFormat = "2006-01-02 15:04:05.999999"
)
View Source
const (
	STRING lexer.Token
	UINT8
	INT8
	UINT16
	INT16
	UINT32
	INT32
	UINT64
	INT64
	FLOAT32
	FLOAT64
	TIMESTAMP
	BOOLEAN

	ADD
	BY
	CLUSTERED
	CREATE
	DESCRIBE
	DROP
	FOR
	FROM
	INSERT
	LIMIT
	LOG
	LOGS
	NAMESPACE
	NAMESPACES
	OFFSET
	ON
	OPTIONAL
	OPTIONS
	PASSWORD
	PERMISSION
	PERMISSIONS
	REMOVE
	REQUIRED
	ROLE
	ROLES
	SELECT
	SET
	SHOW
	SUBSCRIBE
	TO
	TYPE
	TYPES
	UNSUBSCRIBE
	UPDATE
	USE
	USER
	USERS
	USING
	VIEW
	VIEWS
	WHERE
	WITH
)

Token enums Built-in Types

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateNamespaceStatement

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

CreateNamespaceStatement represents the CREATE NAMESPACE statement

func (CreateNamespaceStatement) IsRootNamespace

func (s CreateNamespaceStatement) IsRootNamespace() bool

IsRootNamespace determines if the namespace to be created is a top-level namespace

func (CreateNamespaceStatement) Namespace

func (s CreateNamespaceStatement) Namespace() string

Namespace returns the namespace being requested

func (CreateNamespaceStatement) NodeType

func (s CreateNamespaceStatement) NodeType() NodeType

NodeType returns an NodeType id

func (CreateNamespaceStatement) RequiredPermissions

func (s CreateNamespaceStatement) RequiredPermissions() string

RequiredPermissions returns the required permissions in order to use this command

func (CreateNamespaceStatement) String

func (s CreateNamespaceStatement) String() string

String returns a string representation

type DropNamespaceStatement

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

DropNamespaceStatement represents the DROP NAMESPACE statement

func (DropNamespaceStatement) IsRootNamespace

func (s DropNamespaceStatement) IsRootNamespace() bool

IsRootNamespace determines if the namespace to be created is a top-level namespace

func (DropNamespaceStatement) Namespace

func (s DropNamespaceStatement) Namespace() string

Namespace returns the namespace being requested

func (DropNamespaceStatement) NodeType

func (s DropNamespaceStatement) NodeType() NodeType

NodeType returns an NodeType id

func (DropNamespaceStatement) RequiredPermissions

func (s DropNamespaceStatement) RequiredPermissions() string

RequiredPermissions returns the required permissions in order to use this command

func (DropNamespaceStatement) String

func (s DropNamespaceStatement) String() string

String returns a string representation

type Expr

type Expr interface {
	Node
	ExprType() ExprType
}

Expr represents AST expressions

type ExprType

type ExprType int

ExprType identifies various expressions

type Node

type Node interface {
	NodeType() NodeType
	String() string
}

Node is an interface for AST nodes

type NodeType

type NodeType int

NodeType identifies various AST nodes

const (
	UseNamespaceType    NodeType = iota
	CreateNamespaceType NodeType = iota
	DropNamespaceType   NodeType = iota
	ShowNamespaceType   NodeType = iota
)

type ParseError

type ParseError struct {
	Message  string
	Found    string
	Expected []string
	Pos      lexer.Pos
}

ParseError represents an error that occurred during parsing.

func (*ParseError) Error

func (e *ParseError) Error() string

Error returns the string representation of the error.

type Parser

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

Parser represents an InfluxQL parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of Parser.

func (*Parser) ParseStatement

func (p *Parser) ParseStatement() (Statement, error)

ParseStatement parses a string and returns a Statement AST object.

type ShowNamespacesStatement

type ShowNamespacesStatement struct {
}

CreateNamespaceStatement represents the SHOW NAMESPACES statement

func (ShowNamespacesStatement) NodeType

func (s ShowNamespacesStatement) NodeType() NodeType

NodeType returns an NodeType id

func (ShowNamespacesStatement) RequiredPermissions

func (s ShowNamespacesStatement) RequiredPermissions() string

RequiredPermissions returns the required permissions in order to use this command

func (ShowNamespacesStatement) String

func (s ShowNamespacesStatement) String() string

String returns a string representation

type Statement

type Statement interface {
	Node
	RequiredPermissions() string
}

Statement is the interface for all SKL statements

func ParseStatement

func ParseStatement(s string) (Statement, error)

ParseStatement parses a statement string and returns its AST representation.

type UseStatement

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

UseStatement represents the USE statement

func (UseStatement) Namespace

func (u UseStatement) Namespace() string

Namespace returns the namespace being requested

func (UseStatement) NodeType

func (s UseStatement) NodeType() NodeType

NodeType returns an NodeType id

func (UseStatement) RequiredPermissions

func (s UseStatement) RequiredPermissions() string

RequiredPermissions returns the required permissions in order to use this command

func (UseStatement) String

func (s UseStatement) String() string

String returns a string representation

Jump to

Keyboard shortcuts

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