query

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 35 Imported by: 9

Documentation

Index

Constants

View Source
const (
	ErrorMessageTemplate                  = "[L:%d C:%d] %s"
	ErrorMessageWithFilepathTemplate      = "%s [L:%d C:%d] %s"
	ErrorMessageWithEmptyPositionTemplate = "[L:- C:-] %s"

	ErrorInvalidSyntax                        = "syntax error: unexpected %s"
	ErrorReadFile                             = "failed to read from file: %s"
	ErrorCreateFile                           = "failed to create file: %s"
	ErrorWriteFile                            = "failed to write to file: %s"
	ErrorWriteFileInAutoCommit                = "[Auto-Commit] failed to write to file: %s"
	ErrorFieldAmbiguous                       = "field %s is ambiguous"
	ErrorFieldNotExist                        = "field %s does not exist"
	ErrorFieldNotGroupKey                     = "field %s is not a group key"
	ErrorDuplicateFieldName                   = "field name %s is a duplicate"
	ErrorNotGroupingRecords                   = "function %s cannot aggregate not grouping records"
	ErrorUndeclaredVariable                   = "variable %s is undeclared"
	ErrorVariableRedeclared                   = "variable %s is redeclared"
	ErrorFunctionNotExist                     = "function %s does not exist"
	ErrorFunctionArgumentsLength              = "function %s takes %s"
	ErrorFunctionInvalidArgument              = "%s for function %s"
	ErrorUnpermittedStatementFunction         = "function %s cannot be used as a statement"
	ErrorNestedAggregateFunctions             = "aggregate functions are nested at %s"
	ErrorFunctionRedeclared                   = "function %s is redeclared"
	ErrorBuiltInFunctionDeclared              = "function %s is a built-in function"
	ErrorDuplicateParameter                   = "parameter %s is a duplicate"
	ErrorSubqueryTooManyRecords               = "subquery returns too many records, should return only one record"
	ErrorSubqueryTooManyFields                = "subquery returns too many fields, should return only one field"
	ErrorJsonQueryTooManyRecords              = "json query returns too many records, should return only one record"
	ErrorJsonQuery                            = "json query error: %s"
	ErrorJsonQueryEmpty                       = "json query is empty"
	ErrorJsonTableEmpty                       = "json table is empty"
	ErrorTableObjectInvalidObject             = "invalid table object: %s"
	ErrorTableObjectInvalidDelimiter          = "invalid delimiter: %s"
	ErrorTableObjectInvalidDelimiterPositions = "invalid delimiter positions: %s"
	ErrorTableObjectInvalidJsonQuery          = "invalid json query: %s"
	ErrorTableObjectMultipleRead              = "file %s has already been loaded"
	ErrorTableObjectArgumentsLength           = "table object %s takes at most %d arguments"
	ErrorTableObjectJsonArgumentsLength       = "table object %s takes exactly %d arguments"
	ErrorTableObjectInvalidArgument           = "invalid argument for %s: %s"
	ErrorCursorRedeclared                     = "cursor %s is redeclared"
	ErrorUndeclaredCursor                     = "cursor %s is undeclared"
	ErrorCursorClosed                         = "cursor %s is closed"

	ErrorPseudoCursor                        = "cursor %s is a pseudo cursor"
	ErrorCursorFetchLength                   = "fetching from cursor %s returns %s"
	ErrorInvalidFetchPosition                = "fetching position %s is not an integer value"
	ErrorInlineTableRedefined                = "inline table %s is redefined"
	ErrorUndefinedInlineTable                = "inline table %s is undefined"
	ErrorInlineTableFieldLength              = "select query should return exactly %s for inline table %s"
	ErrorFileNotExist                        = "file %s does not exist"
	ErrorFileAlreadyExist                    = "file %s already exists"
	ErrorFileUnableToRead                    = "file %s is unable to be read"
	ErrorFileLockTimeout                     = "file %s: lock wait timeout period exceeded"
	ErrorFileNameAmbiguous                   = "filename %s is ambiguous"
	ErrorDataParsing                         = "data parse error in file %s: %s"
	ErrorTableFieldLength                    = "select query should return exactly %s for table %s"
	ErrorTemporaryTableRedeclared            = "view %s is redeclared"
	ErrorUndeclaredTemporaryTable            = "view %s is undeclared"
	ErrorTemporaryTableFieldLength           = "select query should return exactly %s for view %s"
	ErrorDuplicateTableName                  = "table name %s is a duplicate"
	ErrorTableNotLoaded                      = "table %s is not loaded"
	ErrorStdinEmpty                          = "stdin is empty"
	ErrorRowValueLengthInComparison          = "row value should contain exactly %s"
	ErrorFieldLengthInComparison             = "select query should return exactly %s"
	ErrorInvalidLimitPercentage              = "limit percentage %s is not a float value"
	ErrorInvalidLimitNumber                  = "limit number of records %s is not an integer value"
	ErrorInvalidOffsetNumber                 = "offset number %s is not an integer value"
	ErrorCombinedSetFieldLength              = "result set to be combined should contain exactly %s"
	ErrorInsertRowValueLength                = "row value should contain exactly %s"
	ErrorInsertSelectFieldLength             = "select query should return exactly %s"
	ErrorUpdateFieldNotExist                 = "field %s does not exist in the tables to update"
	ErrorUpdateValueAmbiguous                = "value %s to set in the field %s is ambiguous"
	ErrorDeleteTableNotSpecified             = "tables to delete records are not specified"
	ErrorShowInvalidObjectType               = "object type %s is invalid"
	ErrorPrintfReplaceValueLength            = "%s"
	ErrorSourceInvalidArgument               = "argument %s is not a string"
	ErrorSourceFileNotExist                  = "file %s does not exist"
	ErrorSourceFileUnableToRead              = "file %s is unable to read"
	ErrorInvalidFlagName                     = "flag %s does not exist"
	ErrorFlagValueNowAllowedFormat           = "%s for %s is not allowed"
	ErrorInvalidFlagValue                    = "%s"
	ErrorNotTable                            = "%s is not a table that has attributes"
	ErrorInvalidTableAttributeName           = "table attribute %s does not exist"
	ErrorTableAttributeValueNotAllowedFormat = "%s for %s is not allowed"
	ErrorInvalidTableAttributeValue          = "%s"
	ErrorInvalidEventName                    = "%s is an unknown event"
	ErrorInternalRecordIdNotExist            = "internal record id does not exist"
	ErrorInternalRecordIdEmpty               = "internal record id is empty"
	ErrorFieldLengthNotMatch                 = "field length does not match"
	ErrorRowValueLengthInList                = "row value length does not match at index %d"
	ErrorFormatStringLengthNotMatch          = "number of replace values does not match"
)
View Source
const (
	TableDelimiter   = "DELIMITER"
	TableFormat      = "FORMAT"
	TableEncoding    = "ENCODING"
	TableLineBreak   = "LINE_BREAK"
	TableHeader      = "HEADER"
	TablePrettyPring = "PRETTY_PRINT"
)
View Source
const IgnoredFlagPrefix = "(ignored) "
View Source
const InternalIdColumn = "@__internal_id"
View Source
const MinimumRequiredForParallelRoutine = 150

Variables

View Source
var AggregateFunctions = map[string]AggregateFunction{
	"COUNT":  Count,
	"MAX":    Max,
	"MIN":    Min,
	"SUM":    Sum,
	"AVG":    Avg,
	"MEDIAN": Median,
}
View Source
var AnalyticFunctions = map[string]AnalyticFunction{
	"ROW_NUMBER":   RowNumber{},
	"RANK":         Rank{},
	"DENSE_RANK":   DenseRank{},
	"CUME_DIST":    CumeDist{},
	"PERCENT_RANK": PercentRank{},
	"NTILE":        NTile{},
	"FIRST_VALUE":  FirstValue{},
	"LAST_VALUE":   LastValue{},
	"NTH_VALUE":    NthValue{},
	"LAG":          Lag{},
	"LEAD":         Lead{},
	"LISTAGG":      AnalyticListAgg{},
	"JSON_AGG":     AnalyticJsonAgg{},
}
View Source
var ExecResults = make([]ExecResult, 0, 10)
View Source
var Functions = map[string]func(parser.Function, []value.Primary) (value.Primary, error){}/* 105 elements not displayed */
View Source
var SelectLogs = make([]string, 0, 2)
View Source
var ViewCache = make(ViewMap, 10)

Functions

func Abs

func Abs(fn parser.Function, args []value.Primary) (value.Primary, error)

func Acos

func Acos(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddDay

func AddDay(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddHour

func AddHour(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddMicro

func AddMicro(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddMilli

func AddMilli(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddMinute

func AddMinute(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddMonth

func AddMonth(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddNano

func AddNano(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddSecond

func AddSecond(fn parser.Function, args []value.Primary) (value.Primary, error)

func AddSelectLog added in v0.4.4

func AddSelectLog(log string)

func AddYear

func AddYear(fn parser.Function, args []value.Primary) (value.Primary, error)

func All

func All(rowValue value.RowValue, list []value.RowValue, operator string) (ternary.Value, error)

func Analyze added in v0.5.6

func Analyze(view *View, fn parser.AnalyticFunction, partitionIndices []int) error

func Any

func Any(rowValue value.RowValue, list []value.RowValue, operator string) (ternary.Value, error)

func Asin

func Asin(fn parser.Function, args []value.Primary) (value.Primary, error)

func Atan

func Atan(fn parser.Function, args []value.Primary) (value.Primary, error)

func Atan2

func Atan2(fn parser.Function, args []value.Primary) (value.Primary, error)

func Avg

func Avg(list []value.Primary) value.Primary

func Base64Decode

func Base64Decode(fn parser.Function, args []value.Primary) (value.Primary, error)

func Base64Encode

func Base64Encode(fn parser.Function, args []value.Primary) (value.Primary, error)

func Bin

func Bin(fn parser.Function, args []value.Primary) (value.Primary, error)

func BinToDec

func BinToDec(fn parser.Function, args []value.Primary) (value.Primary, error)

func Boolean

func Boolean(fn parser.Function, args []value.Primary) (value.Primary, error)

func ByteLen

func ByteLen(fn parser.Function, args []value.Primary) (value.Primary, error)

func Calculate

func Calculate(p1 value.Primary, p2 value.Primary, operator int) value.Primary

func Call added in v0.1.8

func Call(fn parser.Function, args []value.Primary) (value.Primary, error)

func Ceil

func Ceil(fn parser.Function, args []value.Primary) (value.Primary, error)

func CheckArgsLen added in v0.5.6

func CheckArgsLen(expr parser.AnalyticFunction, length []int) error

func Coalesce

func Coalesce(fn parser.Function, args []value.Primary) (value.Primary, error)

func Commit added in v0.1.6

func Commit(expr parser.Expression, filter *Filter) error

func Cos

func Cos(fn parser.Function, args []value.Primary) (value.Primary, error)

func Count

func Count(list []value.Primary) value.Primary

func CreateFilePath added in v1.5.0

func CreateFilePath(filename parser.Identifier, repository string) (string, error)

func CrossJoin

func CrossJoin(view *View, joinView *View)

func DateDiff

func DateDiff(fn parser.Function, args []value.Primary) (value.Primary, error)

func Datetime

func Datetime(fn parser.Function, args []value.Primary) (value.Primary, error)

func DatetimeFormat

func DatetimeFormat(fn parser.Function, args []value.Primary) (value.Primary, error)

func Day

func Day(fn parser.Function, args []value.Primary) (value.Primary, error)

func DayOfYear

func DayOfYear(fn parser.Function, args []value.Primary) (value.Primary, error)

func DeclareView added in v0.8.6

func DeclareView(expr parser.ViewDeclaration, filter *Filter) error

func Distinguish added in v0.4.10

func Distinguish(list []value.Primary) []value.Primary

func EncodeView added in v0.1.6

func EncodeView(view *View, fileInfo *FileInfo) (string, error)

func Enotation added in v0.5.12

func Enotation(fn parser.Function, args []value.Primary) (value.Primary, error)

func EnotationToDec added in v0.5.12

func EnotationToDec(fn parser.Function, args []value.Primary) (value.Primary, error)

func Exp

func Exp(fn parser.Function, args []value.Primary) (value.Primary, error)

func Exp2

func Exp2(fn parser.Function, args []value.Primary) (value.Primary, error)

func Expm1

func Expm1(fn parser.Function, args []value.Primary) (value.Primary, error)

func FetchCursor added in v0.1.8

func FetchCursor(name parser.Identifier, fetchPosition parser.FetchPosition, vars []parser.Variable, filter *Filter) (bool, error)

func Float

func Float(fn parser.Function, args []value.Primary) (value.Primary, error)

func Floor

func Floor(fn parser.Function, args []value.Primary) (value.Primary, error)

func Format added in v0.5.0

func Format(fn parser.Function, args []value.Primary) (value.Primary, error)

func FormatCount added in v0.4.3

func FormatCount(i int, obj string) string

func FormatString added in v0.5.0

func FormatString(format string, args []value.Primary) (string, error)

func Hex

func Hex(fn parser.Function, args []value.Primary) (value.Primary, error)

func HexDecode

func HexDecode(fn parser.Function, args []value.Primary) (value.Primary, error)

func HexEncode

func HexEncode(fn parser.Function, args []value.Primary) (value.Primary, error)

func HexToDec

func HexToDec(fn parser.Function, args []value.Primary) (value.Primary, error)

func Hour

func Hour(fn parser.Function, args []value.Primary) (value.Primary, error)

func If

func If(fn parser.Function, args []value.Primary) (value.Primary, error)

func Ifnull

func Ifnull(fn parser.Function, args []value.Primary) (value.Primary, error)

func InIntSlice added in v0.1.6

func InIntSlice(i int, list []int) bool

func InRowValueList added in v0.2.2

func InRowValueList(rowValue value.RowValue, list []value.RowValue, matchType int, operator string) (ternary.Value, error)

func InRuneSlice added in v0.5.12

func InRuneSlice(r rune, list []rune) bool

func InStrSliceWithCaseInsensitive added in v0.4.3

func InStrSliceWithCaseInsensitive(s string, list []string) bool

func InnerJoin

func InnerJoin(view *View, joinView *View, condition parser.QueryExpression, parentFilter *Filter) error

func Instr added in v1.1.1

func Instr(fn parser.Function, args []value.Primary) (value.Primary, error)

func Integer

func Integer(fn parser.Function, args []value.Primary) (value.Primary, error)

func Is

func JsonAgg added in v1.3.0

func JsonAgg(list []value.Primary) value.Primary

func JsonObject added in v1.3.0

func JsonObject(fn parser.Function, filter *Filter) (value.Primary, error)

func JsonValue added in v1.3.0

func JsonValue(fn parser.Function, args []value.Primary) (value.Primary, error)

func Len

func Len(fn parser.Function, args []value.Primary) (value.Primary, error)

func Like

func Like(p1 value.Primary, p2 value.Primary) ternary.Value

func ListAgg added in v0.4.9

func ListAgg(list []value.Primary, separator string) value.Primary

func ListElem added in v1.1.1

func ListElem(fn parser.Function, args []value.Primary) (value.Primary, error)

func Log

func Log(log string, quiet bool)

func Log10

func Log10(fn parser.Function, args []value.Primary) (value.Primary, error)

func Log1p

func Log1p(fn parser.Function, args []value.Primary) (value.Primary, error)

func Log2

func Log2(fn parser.Function, args []value.Primary) (value.Primary, error)

func Lower

func Lower(fn parser.Function, args []value.Primary) (value.Primary, error)

func Lpad

func Lpad(fn parser.Function, args []value.Primary) (value.Primary, error)

func Ltrim

func Ltrim(fn parser.Function, args []value.Primary) (value.Primary, error)

func MathLog added in v0.7.1

func MathLog(fn parser.Function, args []value.Primary) (value.Primary, error)

func Max

func Max(list []value.Primary) value.Primary

func Md5

func Md5(fn parser.Function, args []value.Primary) (value.Primary, error)

func Md5Hmac

func Md5Hmac(fn parser.Function, args []value.Primary) (value.Primary, error)

func Median added in v0.5.5

func Median(list []value.Primary) value.Primary

func Microsecond

func Microsecond(fn parser.Function, args []value.Primary) (value.Primary, error)

func Millisecond

func Millisecond(fn parser.Function, args []value.Primary) (value.Primary, error)

func Min

func Min(list []value.Primary) value.Primary

func Minute

func Minute(fn parser.Function, args []value.Primary) (value.Primary, error)

func Month

func Month(fn parser.Function, args []value.Primary) (value.Primary, error)

func Nanosecond

func Nanosecond(fn parser.Function, args []value.Primary) (value.Primary, error)

func NewAutoCommitError added in v0.4.9

func NewAutoCommitError(message string) error

func NewBuiltInFunctionDeclaredError added in v0.4.3

func NewBuiltInFunctionDeclaredError(expr parser.Identifier) error

func NewCombinedSetFieldLengthError added in v0.4.3

func NewCombinedSetFieldLengthError(selectEntity parser.QueryExpression, fieldLen int) error

func NewCreateFileError added in v0.7.4

func NewCreateFileError(expr parser.Expression, message string) error

func NewCursorClosedError added in v0.4.3

func NewCursorClosedError(cursor parser.Identifier) error

func NewCursorFetchLengthError added in v0.4.3

func NewCursorFetchLengthError(cursor parser.Identifier, returnLen int) error

func NewCursorOpenError added in v0.4.3

func NewCursorOpenError(cursor parser.Identifier) error

func NewCursorRedeclaredError added in v0.4.3

func NewCursorRedeclaredError(cursor parser.Identifier) error

func NewDataParsingError added in v1.5.0

func NewDataParsingError(file parser.QueryExpression, filepath string, message string) error

func NewDeleteTableNotSpecifiedError added in v0.4.3

func NewDeleteTableNotSpecifiedError(query parser.DeleteQuery) error

func NewDuplicateFieldNameError added in v0.4.3

func NewDuplicateFieldNameError(fieldName parser.Identifier) error

func NewDuplicateParameterError added in v0.5.0

func NewDuplicateParameterError(expr parser.Variable) error

func NewDuplicateTableNameError added in v0.4.3

func NewDuplicateTableNameError(table parser.Identifier) error

func NewFieldAmbiguousError added in v0.4.0

func NewFieldAmbiguousError(field parser.QueryExpression) error

func NewFieldLengthNotMatchError added in v0.4.3

func NewFieldLengthNotMatchError() error

func NewFieldNotExistError added in v0.4.0

func NewFieldNotExistError(field parser.QueryExpression) error

func NewFieldNotGroupKeyError added in v0.4.3

func NewFieldNotGroupKeyError(field parser.QueryExpression) error

func NewFileAlreadyExistError added in v0.5.3

func NewFileAlreadyExistError(file parser.Identifier) error

func NewFileLockTimeoutError added in v0.7.10

func NewFileLockTimeoutError(file parser.Identifier, path string) error

func NewFileNameAmbiguousError added in v1.5.0

func NewFileNameAmbiguousError(file parser.Identifier) error

func NewFileNotExistError added in v0.4.3

func NewFileNotExistError(file parser.Identifier) error

func NewFileUnableToReadError added in v0.4.3

func NewFileUnableToReadError(file parser.Identifier) error

func NewFlagValueNotAllowedFormatError added in v1.5.0

func NewFlagValueNotAllowedFormatError(setFlag parser.SetFlag) error

func NewForcedExit added in v1.2.0

func NewForcedExit(code int) error

func NewFormatStringLengthNotMatchError added in v0.5.0

func NewFormatStringLengthNotMatchError() error

func NewFunctionArgumentLengthError added in v0.4.3

func NewFunctionArgumentLengthError(expr parser.QueryExpression, funcname string, argslen []int) error

func NewFunctionArgumentLengthErrorWithCustomArgs added in v0.4.3

func NewFunctionArgumentLengthErrorWithCustomArgs(expr parser.QueryExpression, funcname string, argstr string) error

func NewFunctionInvalidArgumentError added in v0.4.3

func NewFunctionInvalidArgumentError(function parser.QueryExpression, funcname string, message string) error

func NewFunctionNotExistError added in v0.4.3

func NewFunctionNotExistError(expr parser.QueryExpression, funcname string) error

func NewFunctionRedeclaredError added in v0.4.3

func NewFunctionRedeclaredError(expr parser.Identifier) error

func NewInLineTableRedefinedError added in v0.8.7

func NewInLineTableRedefinedError(table parser.Identifier) error

func NewInlineTableFieldLengthError added in v0.4.3

func NewInlineTableFieldLengthError(query parser.SelectQuery, table parser.Identifier, fieldLen int) error

func NewInsertRowValueLengthError added in v0.4.3

func NewInsertRowValueLengthError(rowValue parser.RowValue, valueLen int) error

func NewInsertSelectFieldLengthError added in v0.4.3

func NewInsertSelectFieldLengthError(query parser.SelectQuery, fieldLen int) error

func NewInternalRecordIdEmptyError added in v0.4.3

func NewInternalRecordIdEmptyError() error

func NewInternalRecordIdNotExistError added in v0.4.3

func NewInternalRecordIdNotExistError() error

func NewInvalidEventNameError added in v1.5.0

func NewInvalidEventNameError(expr parser.Identifier) error

func NewInvalidFetchPositionError added in v0.4.3

func NewInvalidFetchPositionError(position parser.FetchPosition) error

func NewInvalidFlagNameError added in v0.4.3

func NewInvalidFlagNameError(expr parser.Expression, name string) error

func NewInvalidFlagValueError added in v0.4.3

func NewInvalidFlagValueError(setFlag parser.SetFlag, message string) error

func NewInvalidLimitNumberError added in v0.4.3

func NewInvalidLimitNumberError(clause parser.LimitClause) error

func NewInvalidLimitPercentageError added in v0.4.3

func NewInvalidLimitPercentageError(clause parser.LimitClause) error

func NewInvalidOffsetNumberError added in v0.4.3

func NewInvalidOffsetNumberError(clause parser.OffsetClause) error

func NewInvalidTableAttributeNameError added in v1.5.0

func NewInvalidTableAttributeNameError(expr parser.Identifier) error

func NewInvalidTableAttributeValueError added in v1.5.0

func NewInvalidTableAttributeValueError(expr parser.SetTableAttribute, message string) error

func NewJsonQueryEmptyError added in v1.5.0

func NewJsonQueryEmptyError(expr parser.JsonQuery) error

func NewJsonQueryError added in v1.3.0

func NewJsonQueryError(expr parser.JsonQuery, message string) error

func NewJsonQueryTooManyRecordsError added in v1.3.0

func NewJsonQueryTooManyRecordsError(expr parser.JsonQuery) error

func NewJsonTableEmptyError added in v1.3.0

func NewJsonTableEmptyError(expr parser.JsonQuery) error

func NewNestedAggregateFunctionsError added in v0.4.3

func NewNestedAggregateFunctionsError(expr parser.QueryExpression) error

func NewNotGroupingRecordsError added in v0.4.3

func NewNotGroupingRecordsError(expr parser.QueryExpression, funcname string) error

func NewNotTableError added in v1.5.0

func NewNotTableError(expr parser.QueryExpression) error

func NewPrintfReplaceValueLengthError added in v0.4.3

func NewPrintfReplaceValueLengthError(printf parser.Printf, message string) error

func NewPseudoCursorError added in v0.4.10

func NewPseudoCursorError(cursor parser.Identifier) error

func NewReadFileError added in v0.4.9

func NewReadFileError(expr parser.Expression, message string) error

func NewRowValueLengthInComparisonError added in v0.4.3

func NewRowValueLengthInComparisonError(expr parser.QueryExpression, valueLen int) error

func NewRowValueLengthInListError added in v0.4.3

func NewRowValueLengthInListError(i int) error

func NewSelectFieldLengthInComparisonError added in v0.4.3

func NewSelectFieldLengthInComparisonError(query parser.Subquery, valueLen int) error

func NewShowInvalidObjectTypeError added in v1.5.0

func NewShowInvalidObjectTypeError(expr parser.Expression, objectType string) error

func NewSourceFileNotExistError added in v0.4.3

func NewSourceFileNotExistError(source parser.Source, fpath string) error

func NewSourceFileUnableToReadError added in v0.4.3

func NewSourceFileUnableToReadError(source parser.Source, fpath string) error

func NewSourceInvalidArgumentError added in v0.4.10

func NewSourceInvalidArgumentError(source parser.Source, arg parser.QueryExpression) error

func NewStdinEmptyError added in v0.4.3

func NewStdinEmptyError(stdin parser.Stdin) error

func NewSubqueryTooManyFieldsError added in v0.4.3

func NewSubqueryTooManyFieldsError(expr parser.Subquery) error

func NewSubqueryTooManyRecordsError added in v0.4.3

func NewSubqueryTooManyRecordsError(expr parser.Subquery) error

func NewSyntaxError added in v0.4.3

func NewSyntaxError(message string, line int, char int, sourceFile string) error

func NewSyntaxErrorFromExpr added in v0.4.3

func NewSyntaxErrorFromExpr(expr parser.QueryExpression) error

func NewTableAttributeValueNotAllowedFormatError added in v1.5.0

func NewTableAttributeValueNotAllowedFormatError(expr parser.SetTableAttribute) error

func NewTableFieldLengthError added in v0.6.7

func NewTableFieldLengthError(query parser.SelectQuery, table parser.Identifier, fieldLen int) error

func NewTableNotLoadedError added in v0.4.3

func NewTableNotLoadedError(table parser.Identifier) error

func NewTableObjectArgumentsLengthError added in v1.5.0

func NewTableObjectArgumentsLengthError(expr parser.TableObject, argLen int) error

func NewTableObjectInvalidArgumentError added in v1.5.0

func NewTableObjectInvalidArgumentError(expr parser.TableObject, message string) error

func NewTableObjectInvalidDelimiterError added in v1.5.0

func NewTableObjectInvalidDelimiterError(expr parser.TableObject, delimiter string) error

func NewTableObjectInvalidDelimiterPositionsError added in v1.5.0

func NewTableObjectInvalidDelimiterPositionsError(expr parser.TableObject, positions string) error

func NewTableObjectInvalidJsonQueryError added in v1.5.0

func NewTableObjectInvalidJsonQueryError(expr parser.TableObject, jsonQuery string) error

func NewTableObjectInvalidObjectError added in v1.5.0

func NewTableObjectInvalidObjectError(expr parser.TableObject, objectName string) error

func NewTableObjectJsonArgumentsLengthError added in v1.5.0

func NewTableObjectJsonArgumentsLengthError(expr parser.TableObject, argLen int) error

func NewTableObjectMultipleReadError added in v1.5.0

func NewTableObjectMultipleReadError(tableIdentifier parser.Identifier) error

func NewTemporaryTableFieldLengthError added in v0.4.3

func NewTemporaryTableFieldLengthError(query parser.SelectQuery, table parser.Identifier, fieldLen int) error

func NewTemporaryTableRedeclaredError added in v0.4.3

func NewTemporaryTableRedeclaredError(table parser.Identifier) error

func NewUndeclaredCursorError added in v0.8.7

func NewUndeclaredCursorError(cursor parser.Identifier) error

func NewUndeclaredTemporaryTableError added in v0.8.7

func NewUndeclaredTemporaryTableError(table parser.Identifier) error

func NewUndeclaredVariableError added in v0.8.7

func NewUndeclaredVariableError(expr parser.Variable) error

func NewUndefinedInLineTableError added in v0.4.3

func NewUndefinedInLineTableError(table parser.Identifier) error

func NewUnpermittedStatementFunctionError added in v0.4.3

func NewUnpermittedStatementFunctionError(expr parser.QueryExpression, funcname string) error

func NewUpdateFieldNotExistError added in v0.4.3

func NewUpdateFieldNotExistError(field parser.QueryExpression) error

func NewUpdateValueAmbiguousError added in v0.4.3

func NewUpdateValueAmbiguousError(field parser.QueryExpression, value parser.QueryExpression) error

func NewUserTriggeredError added in v0.5.0

func NewUserTriggeredError(expr parser.Trigger, message string) error

func NewVariableRedeclaredError added in v0.4.3

func NewVariableRedeclaredError(expr parser.Variable) error

func NewWriteFileError added in v0.4.9

func NewWriteFileError(expr parser.Expression, message string) error

func Now

func Now(fn parser.Function, args []value.Primary, filter *Filter) (value.Primary, error)

func Nullif

func Nullif(fn parser.Function, args []value.Primary) (value.Primary, error)

func Oct

func Oct(fn parser.Function, args []value.Primary) (value.Primary, error)

func OctToDec

func OctToDec(fn parser.Function, args []value.Primary) (value.Primary, error)

func OuterJoin

func OuterJoin(view *View, joinView *View, condition parser.QueryExpression, direction int, parentFilter *Filter) error

func ParseJoinCondition

func ParseJoinCondition(join parser.Join, view *View, joinView *View) (parser.QueryExpression, []parser.FieldReference, []parser.FieldReference, error)

func Pow

func Pow(fn parser.Function, args []value.Primary) (value.Primary, error)

func Print added in v0.1.6

func Print(expr parser.Print, filter *Filter) (string, error)

func Printf added in v0.4.0

func Printf(expr parser.Printf, filter *Filter) (string, error)

func Rand

func Rand(fn parser.Function, args []value.Primary) (value.Primary, error)

func ReadSelectLog added in v0.4.4

func ReadSelectLog() string

func RecordRange added in v0.6.2

func RecordRange(cpuIndex int, totalLen int, numberOfCPU int) (int, int)

func ReleaseResources added in v0.8.0

func ReleaseResources()

func Replace

func Replace(fn parser.Function, args []value.Primary) (value.Primary, error)

func Rollback added in v0.1.6

func Rollback(filter *Filter)

func Round

func Round(fn parser.Function, args []value.Primary) (value.Primary, error)

func Rpad

func Rpad(fn parser.Function, args []value.Primary) (value.Primary, error)

func Rtrim

func Rtrim(fn parser.Function, args []value.Primary) (value.Primary, error)

func SearchCSVFilePath added in v1.5.0

func SearchCSVFilePath(filename parser.Identifier, repository string) (string, error)

func SearchFilePath added in v1.5.0

func SearchFilePath(filename parser.Identifier, repository string, format cmd.Format) (string, cmd.Format, error)

func SearchFilePathFromAllTypes added in v1.5.0

func SearchFilePathFromAllTypes(filename parser.Identifier, repository string) (string, error)

func SearchFilePathWithExtType added in v1.5.0

func SearchFilePathWithExtType(filename parser.Identifier, repository string, extTypes []string) (string, error)

func SearchFixedLengthFilePath added in v1.5.0

func SearchFixedLengthFilePath(filename parser.Identifier, repository string) (string, error)

func SearchJsonFilePath added in v1.5.0

func SearchJsonFilePath(filename parser.Identifier, repository string) (string, error)

func Second

func Second(fn parser.Function, args []value.Primary) (value.Primary, error)

func SerializeComparisonKeys added in v0.6.4

func SerializeComparisonKeys(values []value.Primary) string

func SerializeKey added in v0.6.6

func SerializeKey(val value.Primary) string

func SetFlag added in v0.1.6

func SetFlag(expr parser.SetFlag, filter *Filter) (string, error)

func SetTableAttribute added in v1.5.0

func SetTableAttribute(query parser.SetTableAttribute, parentFilter *Filter) (string, error)

func Sha1

func Sha1(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sha1Hmac

func Sha1Hmac(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sha256

func Sha256(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sha256Hmac

func Sha256Hmac(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sha512

func Sha512(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sha512Hmac

func Sha512Hmac(fn parser.Function, args []value.Primary) (value.Primary, error)

func ShowFields added in v0.8.6

func ShowFields(expr parser.ShowFields, filter *Filter) (string, error)

func ShowFlag added in v0.8.0

func ShowFlag(expr parser.ShowFlag) (string, error)

func ShowObjects added in v0.8.6

func ShowObjects(expr parser.ShowObjects, filter *Filter) (string, error)

func Sin

func Sin(fn parser.Function, args []value.Primary) (value.Primary, error)

func Source added in v0.4.0

func Source(expr parser.Source, filter *Filter) ([]parser.Statement, error)

func Sqrt

func Sqrt(fn parser.Function, args []value.Primary) (value.Primary, error)

func String

func String(fn parser.Function, args []value.Primary) (value.Primary, error)

func Substr

func Substr(fn parser.Function, args []value.Primary) (value.Primary, error)

func Sum

func Sum(list []value.Primary) value.Primary

func Tan

func Tan(fn parser.Function, args []value.Primary) (value.Primary, error)

func Ternary

func Ternary(fn parser.Function, args []value.Primary) (value.Primary, error)

func TimeDiff

func TimeDiff(fn parser.Function, args []value.Primary) (value.Primary, error)

func TimeNanoDiff added in v0.7.0

func TimeNanoDiff(fn parser.Function, args []value.Primary) (value.Primary, error)

func Trim

func Trim(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncDay added in v0.7.0

func TruncDay(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncMicro added in v0.7.0

func TruncMicro(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncMilli added in v0.7.0

func TruncMilli(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncMinute added in v0.7.0

func TruncMinute(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncMonth added in v0.7.0

func TruncMonth(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncNano added in v0.7.0

func TruncNano(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncSecond added in v0.7.0

func TruncSecond(fn parser.Function, args []value.Primary) (value.Primary, error)

func TruncTime added in v0.7.0

func TruncTime(fn parser.Function, args []value.Primary) (value.Primary, error)

func UTC added in v0.7.0

func UTC(fn parser.Function, args []value.Primary) (value.Primary, error)

func UncommittedFiles added in v1.5.0

func UncommittedFiles() (map[string]*FileInfo, map[string]*FileInfo)

func UncommittedTempViews added in v1.5.0

func UncommittedTempViews() map[string]*FileInfo

func UnixNanoTime

func UnixNanoTime(fn parser.Function, args []value.Primary) (value.Primary, error)

func UnixTime

func UnixTime(fn parser.Function, args []value.Primary) (value.Primary, error)

func Upper

func Upper(fn parser.Function, args []value.Primary) (value.Primary, error)

func WeekOfYear

func WeekOfYear(fn parser.Function, args []value.Primary) (value.Primary, error)

func Weekday

func Weekday(fn parser.Function, args []value.Primary) (value.Primary, error)

func Width added in v1.5.0

func Width(fn parser.Function, args []value.Primary) (value.Primary, error)

func Year

func Year(fn parser.Function, args []value.Primary) (value.Primary, error)

Types

type AggregateFunction added in v0.5.6

type AggregateFunction func([]value.Primary) value.Primary

type AliasMap added in v0.4.3

type AliasMap map[string]string

func (AliasMap) Add added in v0.4.3

func (m AliasMap) Add(alias parser.Identifier, path string) error

func (AliasMap) Get added in v0.4.3

func (m AliasMap) Get(alias parser.Identifier) (string, error)

type AliasNodes added in v0.7.9

type AliasNodes []AliasMap

func (AliasNodes) Add added in v0.7.9

func (list AliasNodes) Add(alias parser.Identifier, path string) error

func (AliasNodes) Get added in v0.7.9

func (list AliasNodes) Get(alias parser.Identifier) (path string, err error)

type AnalyticFunction added in v0.5.6

type AnalyticFunction interface {
	CheckArgsLen(expr parser.AnalyticFunction) error
	Execute(Partition, parser.AnalyticFunction, *Filter) (map[int]value.Primary, error)
}

type AnalyticJsonAgg added in v1.3.0

type AnalyticJsonAgg struct{}

func (AnalyticJsonAgg) CheckArgsLen added in v1.3.0

func (fn AnalyticJsonAgg) CheckArgsLen(expr parser.AnalyticFunction) error

func (AnalyticJsonAgg) Execute added in v1.3.0

func (fn AnalyticJsonAgg) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type AnalyticListAgg added in v0.5.6

type AnalyticListAgg struct{}

func (AnalyticListAgg) CheckArgsLen added in v0.5.6

func (fn AnalyticListAgg) CheckArgsLen(expr parser.AnalyticFunction) error

func (AnalyticListAgg) Execute added in v0.5.6

func (fn AnalyticListAgg) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type AppError added in v0.4.3

type AppError interface {
	Error() string
	ErrorMessage() string
	GetCode() int
}

type AutoCommitError added in v0.4.9

type AutoCommitError struct {
	Message string
}

func (AutoCommitError) Error added in v0.4.9

func (e AutoCommitError) Error() string

type BaseError added in v0.4.3

type BaseError struct {
	SourceFile string
	Line       int
	Char       int
	Message    string
	Code       int
}

func NewBaseError added in v0.4.3

func NewBaseError(expr parser.Expression, message string) *BaseError

func NewBaseErrorWithCode added in v0.5.0

func NewBaseErrorWithCode(expr parser.Expression, message string, code int) *BaseError

func (BaseError) Error added in v0.4.3

func (e BaseError) Error() string

func (BaseError) ErrorMessage added in v0.4.3

func (e BaseError) ErrorMessage() string

func (BaseError) GetCode added in v0.5.0

func (e BaseError) GetCode() int

type BuiltInFunctionDeclaredError added in v0.4.3

type BuiltInFunctionDeclaredError struct {
	*BaseError
}

type Cell

type Cell []value.Primary

func NewCell

func NewCell(val value.Primary) Cell

func NewGroupCell

func NewGroupCell(values []value.Primary) Cell

func (Cell) GroupedValue added in v0.7.9

func (cell Cell) GroupedValue(index int) value.Primary

func (Cell) Len

func (cell Cell) Len() int

func (Cell) Value added in v0.7.9

func (cell Cell) Value() value.Primary

type CombinedSetFieldLengthError added in v0.4.3

type CombinedSetFieldLengthError struct {
	*BaseError
}

type CreateFileError added in v0.7.4

type CreateFileError struct {
	*BaseError
}

type CumeDist added in v0.5.5

type CumeDist struct{}

func (CumeDist) CheckArgsLen added in v0.5.6

func (fn CumeDist) CheckArgsLen(expr parser.AnalyticFunction) error

func (CumeDist) Execute added in v0.5.6

func (fn CumeDist) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type Cursor added in v0.1.8

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

func NewCursor added in v0.1.8

func NewCursor(name string, query parser.SelectQuery) *Cursor

func NewPseudoCursor added in v0.4.10

func NewPseudoCursor(values []value.Primary) *Cursor

func (*Cursor) Close added in v0.1.8

func (c *Cursor) Close(name parser.Identifier) error

func (*Cursor) Count added in v1.5.0

func (c *Cursor) Count() (int, error)

func (*Cursor) Fetch added in v0.1.8

func (c *Cursor) Fetch(name parser.Identifier, position int, number int) ([]value.Primary, error)

func (*Cursor) IsInRange added in v1.5.0

func (c *Cursor) IsInRange() (ternary.Value, error)

func (*Cursor) IsOpen added in v1.5.0

func (c *Cursor) IsOpen() ternary.Value

func (*Cursor) Open added in v0.1.8

func (c *Cursor) Open(name parser.Identifier, filter *Filter) error

func (*Cursor) Pointer added in v1.5.0

func (c *Cursor) Pointer() (int, error)

type CursorClosedError added in v0.4.3

type CursorClosedError struct {
	*BaseError
}

type CursorFetchLengthError added in v0.4.3

type CursorFetchLengthError struct {
	*BaseError
}

type CursorMap added in v0.1.8

type CursorMap map[string]*Cursor

func (CursorMap) AddPseudoCursor added in v0.4.10

func (m CursorMap) AddPseudoCursor(name parser.Identifier, values []value.Primary) error

func (CursorMap) Close added in v0.1.8

func (m CursorMap) Close(name parser.Identifier) error

func (CursorMap) Count added in v0.4.10

func (m CursorMap) Count(name parser.Identifier) (int, error)

func (CursorMap) Declare added in v0.4.3

func (m CursorMap) Declare(expr parser.CursorDeclaration) error

func (CursorMap) Dispose added in v0.1.8

func (m CursorMap) Dispose(name parser.Identifier) error

func (CursorMap) Fetch added in v0.1.8

func (m CursorMap) Fetch(name parser.Identifier, position int, number int) ([]value.Primary, error)

func (CursorMap) IsInRange added in v0.2.5

func (m CursorMap) IsInRange(name parser.Identifier) (ternary.Value, error)

func (CursorMap) IsOpen added in v0.2.5

func (m CursorMap) IsOpen(name parser.Identifier) (ternary.Value, error)

func (CursorMap) Keys added in v1.5.0

func (m CursorMap) Keys() []string

func (CursorMap) Open added in v0.1.8

func (m CursorMap) Open(name parser.Identifier, filter *Filter) error

func (CursorMap) SortedKeys added in v1.5.0

func (m CursorMap) SortedKeys() []string

type CursorOpenError added in v0.4.3

type CursorOpenError struct {
	*BaseError
}

type CursorRedeclaredError added in v0.4.3

type CursorRedeclaredError struct {
	*BaseError
}

type CursorScopes added in v0.7.9

type CursorScopes []CursorMap

func (CursorScopes) AddPseudoCursor added in v0.7.9

func (list CursorScopes) AddPseudoCursor(name parser.Identifier, values []value.Primary) error

func (CursorScopes) All added in v1.5.0

func (list CursorScopes) All() CursorMap

func (CursorScopes) Close added in v0.7.9

func (list CursorScopes) Close(name parser.Identifier) error

func (CursorScopes) Count added in v0.7.9

func (list CursorScopes) Count(name parser.Identifier) (int, error)

func (CursorScopes) Declare added in v0.7.9

func (list CursorScopes) Declare(expr parser.CursorDeclaration) error

func (CursorScopes) Dispose added in v0.7.9

func (list CursorScopes) Dispose(name parser.Identifier) error

func (CursorScopes) Fetch added in v0.7.9

func (list CursorScopes) Fetch(name parser.Identifier, position int, number int) ([]value.Primary, error)

func (CursorScopes) IsInRange added in v0.7.9

func (list CursorScopes) IsInRange(name parser.Identifier) (ternary.Value, error)

func (CursorScopes) IsOpen added in v0.7.9

func (list CursorScopes) IsOpen(name parser.Identifier) (ternary.Value, error)

func (CursorScopes) Open added in v0.7.9

func (list CursorScopes) Open(name parser.Identifier, filter *Filter) error

type DataParsingError added in v1.5.0

type DataParsingError struct {
	*BaseError
}

type DeleteTableNotSpecifiedError added in v0.4.3

type DeleteTableNotSpecifiedError struct {
	*BaseError
}

type DenseRank added in v0.2.3

type DenseRank struct{}

func (DenseRank) CheckArgsLen added in v0.5.6

func (fn DenseRank) CheckArgsLen(expr parser.AnalyticFunction) error

func (DenseRank) Execute added in v0.5.6

func (fn DenseRank) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type Direction added in v1.5.0

type Direction string
const (
	RightDirection Direction = "R"
	LeftDirection            = "L"
)

type DuplicateFieldNameError added in v0.4.3

type DuplicateFieldNameError struct {
	*BaseError
}

type DuplicateParameterError added in v0.5.0

type DuplicateParameterError struct {
	*BaseError
}

type DuplicateTableNameError added in v0.4.3

type DuplicateTableNameError struct {
	*BaseError
}

type ExecResult added in v1.5.0

type ExecResult struct {
	Type          OperationType
	FileInfo      *FileInfo
	OperatedCount int
}

type FieldAmbiguousError added in v0.4.0

type FieldAmbiguousError struct {
	*BaseError
}

type FieldLengthNotMatchError added in v0.4.3

type FieldLengthNotMatchError struct {
	*BaseError
}

type FieldNotExistError added in v0.4.0

type FieldNotExistError struct {
	*BaseError
}

type FieldNotGroupKeyError added in v0.4.3

type FieldNotGroupKeyError struct {
	*BaseError
}

type FileAlreadyExistError added in v0.5.3

type FileAlreadyExistError struct {
	*BaseError
}

type FileInfo

type FileInfo struct {
	Path      string
	Delimiter rune

	Format             cmd.Format
	DelimiterPositions text.DelimiterPositions
	JsonQuery          string
	Encoding           cmd.Encoding
	LineBreak          cmd.LineBreak
	NoHeader           bool
	PrettyPrint        bool

	File *os.File

	IsTemporary      bool
	InitialHeader    Header
	InitialRecordSet RecordSet
}

func NewFileInfo

func NewFileInfo(
	filename parser.Identifier,
	repository string,
	format cmd.Format,
	delimiter rune,
	encoding cmd.Encoding,
) (*FileInfo, error)

func NewFileInfoForCreate added in v0.5.3

func NewFileInfoForCreate(filename parser.Identifier, repository string, delimiter rune, encoding cmd.Encoding) (*FileInfo, error)

func (*FileInfo) Equivalent added in v1.5.0

func (f *FileInfo) Equivalent(f2 *FileInfo) bool

func (*FileInfo) SetDelimiter added in v1.5.0

func (f *FileInfo) SetDelimiter(s string) error

func (*FileInfo) SetEncoding added in v1.5.0

func (f *FileInfo) SetEncoding(s string) error

func (*FileInfo) SetFormat added in v1.5.0

func (f *FileInfo) SetFormat(s string) error

func (*FileInfo) SetLineBreak added in v1.5.0

func (f *FileInfo) SetLineBreak(s string) error

func (*FileInfo) SetNoHeader added in v1.5.0

func (f *FileInfo) SetNoHeader(b bool)

func (*FileInfo) SetPrettyPrint added in v1.5.0

func (f *FileInfo) SetPrettyPrint(b bool)

type FileLockTimeoutError added in v0.7.10

type FileLockTimeoutError struct {
	*BaseError
}

type FileNameAmbiguousError added in v1.5.0

type FileNameAmbiguousError struct {
	*BaseError
}

type FileNotExistError added in v0.4.3

type FileNotExistError struct {
	*BaseError
}

type FileUnableToReadError added in v0.4.3

type FileUnableToReadError struct {
	*BaseError
}

type Filter

type Filter struct {
	Records []FilterRecord

	Variables VariableScopes
	TempViews TemporaryViewScopes
	Cursors   CursorScopes
	Functions UserDefinedFunctionScopes

	InlineTables InlineTableNodes
	Aliases      AliasNodes

	RecursiveTable   *parser.InlineTable
	RecursiveTmpView *View

	Now time.Time
	// contains filtered or unexported fields
}

func NewEmptyFilter added in v0.4.3

func NewEmptyFilter() *Filter

func NewFilter added in v0.4.0

func NewFilter(variableScopes VariableScopes, tempViewScopes TemporaryViewScopes, cursorScopes CursorScopes, functionScopes UserDefinedFunctionScopes) *Filter

func NewFilterForRecord added in v0.2.4

func NewFilterForRecord(view *View, recordIndex int, parentFilter *Filter) *Filter

func NewFilterForSequentialEvaluation added in v0.4.4

func NewFilterForSequentialEvaluation(view *View, parentFilter *Filter) *Filter

func (*Filter) CreateChildScope added in v0.4.9

func (f *Filter) CreateChildScope() *Filter

func (*Filter) CreateNode added in v0.4.4

func (f *Filter) CreateNode() *Filter

func (*Filter) Evaluate

func (f *Filter) Evaluate(expr parser.QueryExpression) (value.Primary, error)

func (*Filter) LoadInlineTable added in v0.4.0

func (f *Filter) LoadInlineTable(clause parser.WithClause) error

func (*Filter) Merge added in v0.2.4

func (f *Filter) Merge(filter *Filter)

func (*Filter) ResetCurrentScope added in v1.0.0

func (f *Filter) ResetCurrentScope()

type FilterRecord

type FilterRecord struct {
	View        *View
	RecordIndex int
	// contains filtered or unexported fields
}

type FirstValue added in v0.4.9

type FirstValue struct{}

func (FirstValue) CheckArgsLen added in v0.5.6

func (fn FirstValue) CheckArgsLen(expr parser.AnalyticFunction) error

func (FirstValue) Execute added in v0.5.6

func (fn FirstValue) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type FlagValueNotAllowedFormatError added in v1.5.0

type FlagValueNotAllowedFormatError struct {
	*BaseError
}

type ForcedExit added in v1.2.0

type ForcedExit struct {
	Code int
}

func (ForcedExit) Error added in v1.2.0

func (e ForcedExit) Error() string

func (ForcedExit) GetCode added in v1.2.0

func (e ForcedExit) GetCode() int

type FormatStringLengthNotMatchError added in v0.5.0

type FormatStringLengthNotMatchError struct {
	*BaseError
}

type FunctionArgumentLengthError added in v0.4.3

type FunctionArgumentLengthError struct {
	*BaseError
}

type FunctionInvalidArgumentError added in v0.4.3

type FunctionInvalidArgumentError struct {
	*BaseError
}

type FunctionNotExistError added in v0.4.3

type FunctionNotExistError struct {
	*BaseError
}

type FunctionRedeclaredError added in v0.4.3

type FunctionRedeclaredError struct {
	*BaseError
}

type GoroutineManager added in v0.8.7

type GoroutineManager struct {
	CPU int
	// contains filtered or unexported fields
}

func NewGoroutineManager added in v0.8.7

func NewGoroutineManager(recordLen int, minimumRequired int) *GoroutineManager

func (*GoroutineManager) Add added in v0.8.7

func (m *GoroutineManager) Add()

func (*GoroutineManager) Done added in v0.8.7

func (m *GoroutineManager) Done()

func (*GoroutineManager) Error added in v1.0.0

func (m *GoroutineManager) Error() error

func (*GoroutineManager) HasError added in v1.0.0

func (m *GoroutineManager) HasError() bool

func (*GoroutineManager) RecordRange added in v0.8.7

func (m *GoroutineManager) RecordRange(routineIndex int) (int, int)

func (*GoroutineManager) SetError added in v1.0.0

func (m *GoroutineManager) SetError(e error)

func (*GoroutineManager) Wait added in v0.8.7

func (m *GoroutineManager) Wait()
type Header []HeaderField

func AddHeaderField

func AddHeaderField(h Header, column string, alias string) (header Header, index int)

func MergeHeader

func MergeHeader(h1 Header, h2 Header) Header

func NewDualHeader

func NewDualHeader() Header

func NewEmptyHeader

func NewEmptyHeader(len int) Header

func NewHeader

func NewHeader(view string, words []string) Header

func NewHeaderWithAutofill added in v1.5.0

func NewHeaderWithAutofill(view string, words []string) Header

func NewHeaderWithId added in v0.5.6

func NewHeaderWithId(view string, words []string) Header

func (Header) Contains

func (h Header) Contains(fieldRef parser.FieldReference) (int, error)

func (Header) ContainsInternalId added in v0.7.2

func (h Header) ContainsInternalId(viewName string) (int, error)

func (Header) ContainsNumber added in v0.4.6

func (h Header) ContainsNumber(number parser.ColumnNumber) (int, error)

func (Header) ContainsObject added in v0.2.3

func (h Header) ContainsObject(obj parser.QueryExpression) (int, error)

func (Header) Copy added in v0.1.6

func (h Header) Copy() Header

func (Header) Len

func (h Header) Len() int

func (Header) TableColumnNames added in v0.1.6

func (h Header) TableColumnNames() []string

func (Header) TableColumns

func (h Header) TableColumns() []parser.QueryExpression

func (Header) Update added in v0.4.6

func (h Header) Update(reference string, fields []parser.QueryExpression) error

type HeaderField

type HeaderField struct {
	View         string
	Column       string
	Aliases      []string
	Number       int
	IsFromTable  bool
	IsJoinColumn bool
	IsGroupKey   bool
}

type InLineTableRedefinedError added in v0.8.7

type InLineTableRedefinedError struct {
	*BaseError
}

type InlineTableFieldLengthError added in v0.4.3

type InlineTableFieldLengthError struct {
	*BaseError
}

type InlineTableMap added in v0.7.9

type InlineTableMap map[string]*View

func (InlineTableMap) Get added in v0.7.9

func (it InlineTableMap) Get(name parser.Identifier) (*View, error)

func (InlineTableMap) Set added in v0.7.9

func (it InlineTableMap) Set(inlineTable parser.InlineTable, parentFilter *Filter) error

type InlineTableNodes added in v0.7.9

type InlineTableNodes []InlineTableMap

func (InlineTableNodes) Get added in v0.7.9

func (list InlineTableNodes) Get(name parser.Identifier) (*View, error)

func (InlineTableNodes) Load added in v0.7.9

func (list InlineTableNodes) Load(clause parser.WithClause, parentFilter *Filter) error

func (InlineTableNodes) Set added in v0.7.9

func (list InlineTableNodes) Set(inlineTable parser.InlineTable, parentFilter *Filter) error

type InsertRowValueLengthError added in v0.4.3

type InsertRowValueLengthError struct {
	*BaseError
}

type InsertSelectFieldLengthError added in v0.4.3

type InsertSelectFieldLengthError struct {
	*BaseError
}

type InternalRecordIdEmptyError added in v0.4.3

type InternalRecordIdEmptyError struct {
	*BaseError
}

type InternalRecordIdNotExistError added in v0.4.3

type InternalRecordIdNotExistError struct {
	*BaseError
}

type InvalidEventNameError added in v1.5.0

type InvalidEventNameError struct {
	*BaseError
}

type InvalidFetchPositionError added in v0.4.3

type InvalidFetchPositionError struct {
	*BaseError
}

type InvalidFlagNameError added in v0.4.3

type InvalidFlagNameError struct {
	*BaseError
}

type InvalidFlagValueError added in v0.4.3

type InvalidFlagValueError struct {
	*BaseError
}

type InvalidLimitNumberError added in v0.4.3

type InvalidLimitNumberError struct {
	*BaseError
}

type InvalidLimitPercentageError added in v0.4.3

type InvalidLimitPercentageError struct {
	*BaseError
}

type InvalidOffsetNumberError added in v0.4.3

type InvalidOffsetNumberError struct {
	*BaseError
}

type InvalidTableAttributeNameError added in v1.5.0

type InvalidTableAttributeNameError struct {
	*BaseError
}

type InvalidTableAttributeValueError added in v1.5.0

type InvalidTableAttributeValueError struct {
	*BaseError
}

type JsonQueryEmptyError added in v1.5.0

type JsonQueryEmptyError struct {
	*BaseError
}

type JsonQueryError added in v1.3.0

type JsonQueryError struct {
	*BaseError
}

type JsonQueryTooManyRecordsError added in v1.3.0

type JsonQueryTooManyRecordsError struct {
	*BaseError
}

type JsonTableEmptyError added in v1.3.0

type JsonTableEmptyError struct {
	*BaseError
}

type Lag added in v0.5.6

type Lag struct{}

func (Lag) CheckArgsLen added in v0.5.6

func (fn Lag) CheckArgsLen(expr parser.AnalyticFunction) error

func (Lag) Execute added in v0.5.6

func (fn Lag) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type LastValue added in v0.4.9

type LastValue struct{}

func (LastValue) CheckArgsLen added in v0.5.6

func (fn LastValue) CheckArgsLen(expr parser.AnalyticFunction) error

func (LastValue) Execute added in v0.5.6

func (fn LastValue) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type Lead added in v0.5.6

type Lead struct{}

func (Lead) CheckArgsLen added in v0.5.6

func (fn Lead) CheckArgsLen(expr parser.AnalyticFunction) error

func (Lead) Execute added in v0.5.6

func (fn Lead) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type NTile added in v0.5.6

type NTile struct{}

func (NTile) CheckArgsLen added in v0.5.6

func (fn NTile) CheckArgsLen(expr parser.AnalyticFunction) error

func (NTile) Execute added in v0.5.6

func (fn NTile) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type NestedAggregateFunctionsError added in v0.4.3

type NestedAggregateFunctionsError struct {
	*BaseError
}

type NotGroupingRecordsError added in v0.4.3

type NotGroupingRecordsError struct {
	*BaseError
}

type NotTableError added in v1.5.0

type NotTableError struct {
	*BaseError
}

type NthValue added in v0.5.6

type NthValue struct{}

func (NthValue) CheckArgsLen added in v0.5.6

func (fn NthValue) CheckArgsLen(expr parser.AnalyticFunction) error

func (NthValue) Execute added in v0.5.6

func (fn NthValue) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type ObjectStatus added in v1.5.0

type ObjectStatus int
const (
	ObjectFixed ObjectStatus = iota
	ObjectCreated
	ObjectUpdated
)

type OperationType added in v0.5.6

type OperationType int
const (
	InsertQuery OperationType = iota
	UpdateQuery
	DeleteQuery
	CreateTableQuery
	AddColumnsQuery
	DropColumnsQuery
	RenameColumnQuery
)

type PaddingType added in v1.5.0

type PaddingType string
const (
	PaddingRuneCount PaddingType = "LEN"
	PaddingByteCount PaddingType = "BYTE"
	PaddingWidth     PaddingType = "WIDTH"
)

type Partition added in v0.5.6

type Partition []int

func (Partition) Reverse added in v0.6.6

func (p Partition) Reverse()

type Partitions added in v0.6.7

type Partitions map[string]Partition

type PercentRank added in v0.5.5

type PercentRank struct{}

func (PercentRank) CheckArgsLen added in v0.5.6

func (fn PercentRank) CheckArgsLen(expr parser.AnalyticFunction) error

func (PercentRank) Execute added in v0.5.6

func (fn PercentRank) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type PrintfReplaceValueLengthError added in v0.4.3

type PrintfReplaceValueLengthError struct {
	*BaseError
}

type Procedure added in v0.4.0

type Procedure struct {
	Filter           *Filter
	ReturnVal        value.Primary
	MeasurementStart time.Time
}

func NewProcedure added in v0.4.0

func NewProcedure() *Procedure

func (*Procedure) Case added in v0.7.3

func (proc *Procedure) Case(stmt parser.Case) (StatementFlow, error)

func (*Procedure) Execute added in v0.4.0

func (proc *Procedure) Execute(statements []parser.Statement) (StatementFlow, error)

func (*Procedure) ExecuteChild added in v0.4.0

func (proc *Procedure) ExecuteChild(statements []parser.Statement) (StatementFlow, error)

func (*Procedure) ExecuteStatement added in v0.4.0

func (proc *Procedure) ExecuteStatement(stmt parser.Statement) (StatementFlow, error)

func (*Procedure) IfStmt added in v0.4.0

func (proc *Procedure) IfStmt(stmt parser.If) (StatementFlow, error)

func (*Procedure) NewChildProcedure added in v0.4.0

func (proc *Procedure) NewChildProcedure() *Procedure

func (*Procedure) While added in v0.4.0

func (proc *Procedure) While(stmt parser.While) (StatementFlow, error)

func (*Procedure) WhileInCursor added in v0.4.0

func (proc *Procedure) WhileInCursor(stmt parser.WhileInCursor) (StatementFlow, error)

type PseudoCursorError added in v0.4.10

type PseudoCursorError struct {
	*BaseError
}

type Rank added in v0.2.3

type Rank struct{}

func (Rank) CheckArgsLen added in v0.5.6

func (fn Rank) CheckArgsLen(expr parser.AnalyticFunction) error

func (Rank) Execute added in v0.5.6

func (fn Rank) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type ReadFileError added in v0.4.9

type ReadFileError struct {
	*BaseError
}

type Record

type Record []Cell

func MergeRecord added in v0.6.1

func MergeRecord(r1 Record, r2 Record) Record

func NewEmptyRecord

func NewEmptyRecord(len int) Record

func NewRecord

func NewRecord(values []value.Primary) Record

func NewRecordWithId added in v0.5.6

func NewRecordWithId(internalId int, values []value.Primary) Record

func (Record) Copy added in v0.1.6

func (r Record) Copy() Record

func (Record) GroupLen

func (r Record) GroupLen() int

func (Record) SerializeComparisonKeys added in v0.6.6

func (r Record) SerializeComparisonKeys() string

type RecordReader added in v1.5.0

type RecordReader interface {
	Read() ([]value.Field, error)
}

type RecordSet added in v0.7.9

type RecordSet []Record

func MergeRecordSetList added in v0.7.9

func MergeRecordSetList(list []RecordSet) RecordSet

func (RecordSet) Copy added in v0.7.9

func (r RecordSet) Copy() RecordSet

type RowNumber added in v0.2.3

type RowNumber struct{}

func (RowNumber) CheckArgsLen added in v0.5.6

func (fn RowNumber) CheckArgsLen(expr parser.AnalyticFunction) error

func (RowNumber) Execute added in v0.5.6

func (fn RowNumber) Execute(partition Partition, expr parser.AnalyticFunction, filter *Filter) (map[int]value.Primary, error)

type RowValueLengthInComparisonError added in v0.4.3

type RowValueLengthInComparisonError struct {
	*BaseError
}

type RowValueLengthInListError added in v0.4.3

type RowValueLengthInListError struct {
	*BaseError
	Index int
}

type SelectFieldLengthInComparisonError added in v0.4.3

type SelectFieldLengthInComparisonError struct {
	*BaseError
}

type ShowInvalidObjectTypeError added in v1.5.0

type ShowInvalidObjectTypeError struct {
	*BaseError
}

type SortValue added in v0.6.3

type SortValue struct {
	Type SortValueType

	Integer  int64
	Float    float64
	Datetime int64
	String   string
	Boolean  bool
}

func NewSortValue added in v0.6.3

func NewSortValue(val value.Primary) *SortValue

func (*SortValue) EquivalentTo added in v0.6.3

func (v *SortValue) EquivalentTo(compareValue *SortValue) bool

func (*SortValue) Less added in v0.6.3

func (v *SortValue) Less(compareValue *SortValue) ternary.Value

type SortValueType added in v0.6.3

type SortValueType int
const (
	NullType SortValueType = iota
	IntegerType
	FloatType
	DatetimeType
	BooleanType
	StringType
)

type SortValues added in v0.6.3

type SortValues []*SortValue

func (SortValues) EquivalentTo added in v0.6.3

func (values SortValues) EquivalentTo(compareValues SortValues) bool

func (SortValues) Less added in v0.6.3

func (values SortValues) Less(compareValues SortValues, directions []int, nullPositions []int) bool

func (SortValues) Serialize added in v0.6.8

func (values SortValues) Serialize() string

type SourceFileNotExistError added in v0.4.3

type SourceFileNotExistError struct {
	*BaseError
}

type SourceFileUnableToReadError added in v0.4.3

type SourceFileUnableToReadError struct {
	*BaseError
}

type SourceInvalidArgumentError added in v0.4.10

type SourceInvalidArgumentError struct {
	*BaseError
}

type StatementFlow added in v0.1.8

type StatementFlow int
const (
	Terminate StatementFlow = iota
	Error
	Exit
	Break
	Continue
	Return
)

type StdinEmptyError added in v0.4.3

type StdinEmptyError struct {
	*BaseError
}

type SubqueryTooManyFieldsError added in v0.4.3

type SubqueryTooManyFieldsError struct {
	*BaseError
}

type SubqueryTooManyRecordsError added in v0.4.3

type SubqueryTooManyRecordsError struct {
	*BaseError
}

type SyntaxError added in v0.4.3

type SyntaxError struct {
	*BaseError
}

type TableAttributeValueNotAllowedFormatError added in v1.5.0

type TableAttributeValueNotAllowedFormatError struct {
	*BaseError
}

type TableFieldLengthError added in v0.6.7

type TableFieldLengthError struct {
	*BaseError
}

type TableNotLoadedError added in v0.4.3

type TableNotLoadedError struct {
	*BaseError
}

type TableObjectArgumentsLengthError added in v1.5.0

type TableObjectArgumentsLengthError struct {
	*BaseError
}

type TableObjectInvalidArgumentError added in v1.5.0

type TableObjectInvalidArgumentError struct {
	*BaseError
}

type TableObjectInvalidDelimiterError added in v1.5.0

type TableObjectInvalidDelimiterError struct {
	*BaseError
}

type TableObjectInvalidDelimiterPositionsError added in v1.5.0

type TableObjectInvalidDelimiterPositionsError struct {
	*BaseError
}

type TableObjectInvalidJsonQueryError added in v1.5.0

type TableObjectInvalidJsonQueryError struct {
	*BaseError
}

type TableObjectInvalidObjectError added in v1.5.0

type TableObjectInvalidObjectError struct {
	*BaseError
}

type TableObjectJsonArgumentsLengthError added in v1.5.0

type TableObjectJsonArgumentsLengthError struct {
	*BaseError
}

type TableObjectMultipleReadError added in v1.5.0

type TableObjectMultipleReadError struct {
	*BaseError
}

type TemporaryTableFieldLengthError added in v0.4.3

type TemporaryTableFieldLengthError struct {
	*BaseError
}

type TemporaryTableRedeclaredError added in v0.4.3

type TemporaryTableRedeclaredError struct {
	*BaseError
}

type TemporaryViewScopes added in v0.7.9

type TemporaryViewScopes []ViewMap

func (TemporaryViewScopes) All added in v1.5.0

func (list TemporaryViewScopes) All() ViewMap

func (TemporaryViewScopes) Dispose added in v0.7.9

func (list TemporaryViewScopes) Dispose(name parser.Identifier) error

func (TemporaryViewScopes) Exists added in v0.7.9

func (list TemporaryViewScopes) Exists(name string) bool

func (TemporaryViewScopes) Get added in v0.7.9

func (list TemporaryViewScopes) Get(name parser.Identifier) (*View, error)

func (TemporaryViewScopes) GetWithInternalId added in v0.7.9

func (list TemporaryViewScopes) GetWithInternalId(name parser.Identifier) (*View, error)

func (TemporaryViewScopes) Replace added in v0.7.9

func (list TemporaryViewScopes) Replace(view *View)

func (TemporaryViewScopes) Restore added in v0.7.10

func (list TemporaryViewScopes) Restore()

func (TemporaryViewScopes) Set added in v0.7.9

func (list TemporaryViewScopes) Set(view *View)

func (TemporaryViewScopes) Store added in v0.7.10

func (list TemporaryViewScopes) Store()

type UndeclaredCursorError added in v0.8.7

type UndeclaredCursorError struct {
	*BaseError
}

type UndeclaredTemporaryTableError added in v0.8.7

type UndeclaredTemporaryTableError struct {
	*BaseError
}

type UndeclaredVariableError added in v0.8.7

type UndeclaredVariableError struct {
	*BaseError
}

type UndefinedInLineTableError added in v0.4.3

type UndefinedInLineTableError struct {
	*BaseError
}

type UnpermittedStatementFunctionError added in v0.4.3

type UnpermittedStatementFunctionError struct {
	*BaseError
}

type UpdateFieldNotExistError added in v0.4.3

type UpdateFieldNotExistError struct {
	*BaseError
}

type UpdateValueAmbiguousError added in v0.4.3

type UpdateValueAmbiguousError struct {
	*BaseError
}

type UserDefinedFunction added in v0.4.3

type UserDefinedFunction struct {
	Name         parser.Identifier
	Statements   []parser.Statement
	Parameters   []parser.Variable
	Defaults     map[string]parser.QueryExpression
	RequiredArgs int

	IsAggregate bool
	Cursor      parser.Identifier // For Aggregate Functions
}

func (*UserDefinedFunction) CheckArgsLen added in v0.5.0

func (fn *UserDefinedFunction) CheckArgsLen(expr parser.QueryExpression, name string, argsLen int) error

func (*UserDefinedFunction) Execute added in v0.4.3

func (fn *UserDefinedFunction) Execute(args []value.Primary, filter *Filter) (value.Primary, error)

func (*UserDefinedFunction) ExecuteAggregate added in v0.4.11

func (fn *UserDefinedFunction) ExecuteAggregate(values []value.Primary, args []value.Primary, filter *Filter) (value.Primary, error)

type UserDefinedFunctionMap added in v0.4.3

type UserDefinedFunctionMap map[string]*UserDefinedFunction

func (UserDefinedFunctionMap) CheckDuplicate added in v0.4.10

func (m UserDefinedFunctionMap) CheckDuplicate(name parser.Identifier) error

func (UserDefinedFunctionMap) Declare added in v0.4.3

func (UserDefinedFunctionMap) DeclareAggregate added in v0.4.10

func (m UserDefinedFunctionMap) DeclareAggregate(expr parser.AggregateDeclaration) error

func (UserDefinedFunctionMap) Dispose added in v1.0.1

func (UserDefinedFunctionMap) Get added in v0.4.3

func (UserDefinedFunctionMap) Keys added in v1.5.0

func (m UserDefinedFunctionMap) Keys() []string

func (UserDefinedFunctionMap) SortedKeys added in v1.5.0

func (m UserDefinedFunctionMap) SortedKeys() []string

type UserDefinedFunctionScopes added in v0.7.9

type UserDefinedFunctionScopes []UserDefinedFunctionMap

func (UserDefinedFunctionScopes) All added in v1.5.0

func (UserDefinedFunctionScopes) Declare added in v0.7.9

func (UserDefinedFunctionScopes) DeclareAggregate added in v0.7.9

func (list UserDefinedFunctionScopes) DeclareAggregate(expr parser.AggregateDeclaration) error

func (UserDefinedFunctionScopes) Dispose added in v1.0.1

func (list UserDefinedFunctionScopes) Dispose(name parser.Identifier) error

func (UserDefinedFunctionScopes) Get added in v0.7.9

type UserTriggeredError added in v0.5.0

type UserTriggeredError struct {
	*BaseError
}

type VariableMap added in v0.7.9

type VariableMap map[string]value.Primary

func (VariableMap) Add added in v0.7.9

func (v VariableMap) Add(variable parser.Variable, value value.Primary) error

func (VariableMap) Declare added in v0.7.9

func (v VariableMap) Declare(declaration parser.VariableDeclaration, filter *Filter) error

func (VariableMap) Dispose added in v0.7.9

func (v VariableMap) Dispose(variable parser.Variable) error

func (VariableMap) Get added in v0.7.9

func (v VariableMap) Get(variable parser.Variable) (value.Primary, error)

func (VariableMap) Set added in v0.7.9

func (v VariableMap) Set(variable parser.Variable, value value.Primary) error

func (VariableMap) Substitute added in v0.7.9

func (v VariableMap) Substitute(substitution parser.VariableSubstitution, filter *Filter) (value.Primary, error)

func (VariableMap) SubstituteDirectly added in v0.7.9

func (v VariableMap) SubstituteDirectly(variable parser.Variable, value value.Primary) (value.Primary, error)

type VariableRedeclaredError added in v0.4.3

type VariableRedeclaredError struct {
	*BaseError
}

type VariableScopes added in v0.7.9

type VariableScopes []VariableMap

func (VariableScopes) Declare added in v0.7.9

func (list VariableScopes) Declare(expr parser.VariableDeclaration, filter *Filter) error

func (VariableScopes) Dispose added in v0.7.9

func (list VariableScopes) Dispose(expr parser.Variable) error

func (VariableScopes) Get added in v0.7.9

func (list VariableScopes) Get(expr parser.Variable) (value value.Primary, err error)

func (VariableScopes) Substitute added in v0.7.9

func (list VariableScopes) Substitute(expr parser.VariableSubstitution, filter *Filter) (value value.Primary, err error)

func (VariableScopes) SubstituteDirectly added in v0.7.9

func (list VariableScopes) SubstituteDirectly(variable parser.Variable, value value.Primary) (value.Primary, error)

type View

type View struct {
	Header    Header
	RecordSet RecordSet
	FileInfo  *FileInfo

	Filter *Filter

	OperatedRecords int
	OperatedFields  int

	UseInternalId bool
	ForUpdate     bool
	// contains filtered or unexported fields
}

func AddColumns added in v0.1.6

func AddColumns(query parser.AddColumns, parentFilter *Filter) (*View, error)

func CreateTable added in v0.1.6

func CreateTable(query parser.CreateTable, parentFilter *Filter) (*View, error)

func Delete added in v0.1.6

func Delete(query parser.DeleteQuery, parentFilter *Filter) ([]*View, error)

func DropColumns added in v0.1.6

func DropColumns(query parser.DropColumns, parentFilter *Filter) (*View, error)

func Insert added in v0.1.6

func Insert(query parser.InsertQuery, parentFilter *Filter) (*View, error)

func NewView

func NewView() *View

func NewViewFromGroupedRecord

func NewViewFromGroupedRecord(filterRecord FilterRecord) *View

func RenameColumn added in v0.1.6

func RenameColumn(query parser.RenameColumn, parentFilter *Filter) (*View, error)

func Select added in v0.1.6

func Select(query parser.SelectQuery, parentFilter *Filter) (*View, error)

func Update added in v0.1.6

func Update(query parser.UpdateQuery, parentFilter *Filter) ([]*View, error)

func (*View) Copy added in v0.1.6

func (view *View) Copy() *View

func (*View) Except added in v0.2.1

func (view *View) Except(calcView *View, all bool)

func (*View) ExtendRecordCapacity added in v0.6.8

func (view *View) ExtendRecordCapacity(exprs []parser.QueryExpression) error

func (*View) FieldIndex added in v0.1.6

func (view *View) FieldIndex(fieldRef parser.QueryExpression) (int, error)

func (*View) FieldIndices added in v0.1.6

func (view *View) FieldIndices(fields []parser.QueryExpression) ([]int, error)

func (*View) FieldLen

func (view *View) FieldLen() int

func (*View) FieldViewName added in v0.1.8

func (view *View) FieldViewName(fieldRef parser.QueryExpression) (string, error)

func (*View) Fix

func (view *View) Fix()

func (*View) GenerateComparisonKeys added in v0.6.6

func (view *View) GenerateComparisonKeys()

func (*View) GroupBy

func (view *View) GroupBy(clause parser.GroupByClause) error

func (*View) Having

func (view *View) Having(clause parser.HavingClause) error

func (*View) InsertFromQuery added in v0.1.6

func (view *View) InsertFromQuery(fields []parser.QueryExpression, query parser.SelectQuery) error

func (*View) InsertValues added in v0.1.6

func (view *View) InsertValues(fields []parser.QueryExpression, list []parser.QueryExpression) error

func (*View) InternalRecordId added in v0.1.6

func (view *View) InternalRecordId(ref string, recordIndex int) (int, error)

func (*View) Intersect added in v0.2.1

func (view *View) Intersect(calcView *View, all bool)

func (*View) Len

func (view *View) Len() int

func (*View) Less

func (view *View) Less(i, j int) bool

func (*View) Limit

func (view *View) Limit(clause parser.LimitClause) error

func (*View) ListValuesForAggregateFunctions added in v0.4.9

func (view *View) ListValuesForAggregateFunctions(expr parser.QueryExpression, arg parser.QueryExpression, distinct bool, filter *Filter) ([]value.Primary, error)

func (*View) Load added in v0.1.6

func (view *View) Load(clause parser.FromClause, filter *Filter) error

func (*View) LoadFromTableIdentifier added in v0.4.8

func (view *View) LoadFromTableIdentifier(table parser.QueryExpression, filter *Filter) error

func (*View) Offset added in v0.2.2

func (view *View) Offset(clause parser.OffsetClause) error

func (*View) OrderBy

func (view *View) OrderBy(clause parser.OrderByClause) error

func (*View) RecordLen

func (view *View) RecordLen() int

func (*View) RestoreHeaderReferences added in v0.4.10

func (view *View) RestoreHeaderReferences()

func (*View) Select

func (view *View) Select(clause parser.SelectClause) error

func (*View) SelectAllColumns added in v0.1.6

func (view *View) SelectAllColumns() error

func (*View) Swap

func (view *View) Swap(i, j int)

func (*View) Union added in v0.2.1

func (view *View) Union(calcView *View, all bool)

func (*View) Where

func (view *View) Where(clause parser.WhereClause) error

type ViewMap added in v0.1.6

type ViewMap map[string]*View

func (ViewMap) Clean added in v0.7.10

func (m ViewMap) Clean()

func (ViewMap) Dispose added in v0.7.10

func (m ViewMap) Dispose(name string)

func (ViewMap) DisposeTemporaryTable added in v0.4.1

func (m ViewMap) DisposeTemporaryTable(table parser.Identifier) error

func (ViewMap) Exists added in v0.1.6

func (m ViewMap) Exists(fpath string) bool

func (ViewMap) Get added in v0.1.6

func (m ViewMap) Get(fpath parser.Identifier) (*View, error)

func (ViewMap) GetWithInternalId added in v0.1.6

func (m ViewMap) GetWithInternalId(fpath parser.Identifier) (*View, error)

func (ViewMap) Keys added in v1.5.0

func (m ViewMap) Keys() []string

func (ViewMap) Replace added in v0.2.0

func (m ViewMap) Replace(view *View) error

func (ViewMap) Set added in v0.1.6

func (m ViewMap) Set(view *View)

func (ViewMap) SortedKeys added in v1.5.0

func (m ViewMap) SortedKeys() []string

type WindowFrame added in v1.0.1

type WindowFrame struct {
	Low     int
	High    int
	Records []int
}

func WindowFrameSet added in v1.0.1

func WindowFrameSet(partition Partition, expr parser.AnalyticClause) []WindowFrame

type WriteFileError added in v0.4.9

type WriteFileError struct {
	*BaseError
}

Jump to

Keyboard shortcuts

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