query

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 53 Imported by: 9

Documentation

Index

Constants

View Source
const (
	ShowTables     = "TABLES"
	ShowViews      = "VIEWS"
	ShowCursors    = "CURSORS"
	ShowFunctions  = "FUNCTIONS"
	ShowStatements = "STATEMENTS"
	ShowFlags      = "FLAGS"
	ShowEnv        = "ENV"
	ShowRuninfo    = "RUNINFO"
)
View Source
const (
	ErrorMessageTemplate                 = "[L:%d C:%d] %s"
	ErrorMessageWithFilepathTemplate     = "%s [L:%d C:%d] %s"
	ErrorMessageWithCustomPrefixTemplate = "[%s] %s"

	ErrMsgSignalReceived = "signal received: %s"

	ErrMsgIncorrectCommandUsage                = "incorrect usage: %s"
	ErrMsgInvalidValueExpression               = "%s: cannot evaluate as a value"
	ErrMsgInvalidPath                          = "%s: %s"
	ErrMsgIO                                   = "%s"
	ErrMsgCommit                               = "failed to commit: %s"
	ErrMsgRollback                             = "failed to rollback: %s"
	ErrMsgCannotDetectFileEncoding             = "cannot detect character encoding: %s"
	ErrMsgFieldAmbiguous                       = "field %s is ambiguous"
	ErrMsgFieldNotExist                        = "field %s does not exist"
	ErrMsgFieldNotGroupKey                     = "field %s is not a group key"
	ErrMsgDuplicateFieldName                   = "field name %s is a duplicate"
	ErrMsgNotGroupingRecords                   = "function %s cannot aggregate not grouping records"
	ErrMsgNotAllowedAnalyticFunction           = "analytic function %s is only available in select clause or order by clause"
	ErrMsgUndeclaredVariable                   = "variable %s is undeclared"
	ErrMsgVariableRedeclared                   = "variable %s is redeclared"
	ErrMsgUndefinedConstant                    = "constant %s is not defined"
	ErrMsgInvalidUrl                           = "failed to parse %q as url"
	ErrMsgUnsupportedUrlScheme                 = "url scheme %s is not supported"
	ErrMsgFunctionNotExist                     = "function %s does not exist"
	ErrMsgFunctionArgumentsLength              = "function %s takes %s"
	ErrMsgFunctionInvalidArgument              = "%s for function %s"
	ErrMsgNestedAggregateFunctions             = "aggregate functions are nested at %s"
	ErrMsgFunctionRedeclared                   = "function %s is redeclared"
	ErrMsgBuiltInFunctionDeclared              = "function %s is a built-in function"
	ErrMsgDuplicateParameter                   = "parameter %s is a duplicate"
	ErrMsgSubqueryTooManyRecords               = "subquery returns too many records, should return only one record"
	ErrMsgSubqueryTooManyFields                = "subquery returns too many fields, should return only one field"
	ErrMsgJsonQueryTooManyRecords              = "json query returns too many records, should return only one record"
	ErrMsgLoadJson                             = "json loading error: %s"
	ErrMsgJsonLinesStructure                   = "json lines must be an array of objects"
	ErrMsgIncorrectLateralUsage                = "LATERAL cannot to be used in a RIGHT or FULL outer join"
	ErrMsgEmptyInlineTable                     = "inline table is empty"
	ErrMsgInvalidTableObject                   = "invalid table object: %s"
	ErrMsgTableObjectInvalidDelimiter          = "invalid delimiter: %s"
	ErrMsgTableObjectInvalidDelimiterPositions = "invalid delimiter positions: %s"
	ErrMsgTableObjectInvalidJsonQuery          = "invalid json query: %s"
	ErrMsgTableObjectArgumentsLength           = "table object %s takes at most %d arguments"
	ErrMsgTableObjectJsonArgumentsLength       = "table object %s takes exactly %d arguments"
	ErrMsgTableObjectInvalidArgument           = "invalid argument for %s: %s"
	ErrMsgCursorRedeclared                     = "cursor %s is redeclared"
	ErrMsgUndeclaredCursor                     = "cursor %s is undeclared"
	ErrMsgCursorClosed                         = "cursor %s is closed"
	ErrMsgCursorOpen                           = "cursor %s is already open"
	ErrMsgInvalidCursorStatement               = "invalid cursor statement: %s"
	ErrMsgPseudoCursor                         = "cursor %s is a pseudo cursor"
	ErrMsgCursorFetchLength                    = "fetching from cursor %s returns %s"
	ErrMsgInvalidFetchPosition                 = "fetching position %s is not an integer value"
	ErrMsgInlineTableRedefined                 = "inline table %s is redefined"
	ErrMsgUndefinedInlineTable                 = "inline table %s is undefined"
	ErrMsgInlineTableFieldLength               = "select query should return exactly %s for inline table %s"
	ErrMsgFileNotExist                         = "file %s does not exist"
	ErrMsgFileAlreadyExist                     = "file %s already exists"
	ErrMsgFileUnableToRead                     = "file %s is unable to be read"
	ErrMsgFileLockTimeout                      = "file %s: lock wait timeout period exceeded"
	ErrMsgFileNameAmbiguous                    = "filename %s is ambiguous"
	ErrMsgDataParsing                          = "data parse error in %s: %s"
	ErrMsgDataEncoding                         = "data encode error: %s"
	ErrMsgTableFieldLength                     = "select query should return exactly %s for table %s"
	ErrMsgTemporaryTableRedeclared             = "view %s is redeclared"
	ErrMsgUndeclaredTemporaryTable             = "view %s is undeclared"
	ErrMsgTemporaryTableFieldLength            = "select query should return exactly %s for view %s"
	ErrMsgDuplicateTableName                   = "table name %s is a duplicate"
	ErrMsgTableNotLoaded                       = "table %s is not loaded"
	ErrMsgStdinEmpty                           = "STDIN is empty"
	ErrMsgInlineTableCannotBeUpdated           = "inline table cannot be updated"
	ErrMsgAliasMustBeSpecifiedForUpdate        = "alias to table identification function or URL must be specified for update"
	ErrMsgRowValueLengthInComparison           = "row value should contain exactly %s"
	ErrMsgFieldLengthInComparison              = "select query should return exactly %s"
	ErrMsgInvalidLimitPercentage               = "limit percentage %s is not a float value"
	ErrMsgInvalidLimitNumber                   = "limit number of records %s is not an integer value"
	ErrMsgInvalidOffsetNumber                  = "offset number %s is not an integer value"
	ErrMsgCombinedSetFieldLength               = "result set to be combined should contain exactly %s"
	ErrMsgRecursionExceededLimit               = "iteration of recursive query exceeded the limit %d"
	ErrMsgNestedRecursion                      = "recursive queries are nested"
	ErrMsgInsertRowValueLength                 = "row value should contain exactly %s"
	ErrMsgInsertSelectFieldLength              = "select query should return exactly %s"
	ErrMsgUpdateFieldNotExist                  = "field %s does not exist in the tables to update"
	ErrMsgUpdateValueAmbiguous                 = "value %s to set in the field %s is ambiguous"
	ErrMsgReplaceKeyNotSet                     = "replace Key %s is not set"
	ErrMsgDeleteTableNotSpecified              = "tables to delete records are not specified"
	ErrMsgShowInvalidObjectType                = "object type %s is invalid"
	ErrMsgReplaceValueLength                   = "%s"
	ErrMsgSourceInvalidFilePath                = "%s is a invalid file path"
	ErrMsgInvalidFlagName                      = "%s is an unknown flag"
	ErrMsgFlagValueNowAllowedFormat            = "%s for %s is not allowed"
	ErrMsgInvalidFlagValue                     = "%s"
	ErrMsgAddFlagNotSupportedName              = "add flag element syntax does not support %s"
	ErrMsgRemoveFlagNotSupportedName           = "remove flag element syntax does not support %s"
	ErrMsgInvalidFlagValueToBeRemoved          = "%s is an invalid value for %s to specify the element"
	ErrMsgInvalidRuntimeInformation            = "%s is an unknown runtime information"
	ErrMsgNotTable                             = "table attributes can only be set on files"
	ErrMsgInvalidTableAttributeName            = "table attribute %s does not exist"
	ErrMsgTableAttributeValueNotAllowedFormat  = "%s for %s is not allowed"
	ErrMsgInvalidTableAttributeValue           = "%s"
	ErrMsgInvalidEventName                     = "%s is an unknown event"
	ErrMsgInternalRecordIdNotExist             = "internal record id does not exist"
	ErrMsgInternalRecordIdEmpty                = "internal record id is empty"
	ErrMsgFieldLengthNotMatch                  = "field length does not match"
	ErrMsgRowValueLengthInList                 = "row value length does not match at index %d"
	ErrMsgFormatStringLengthNotMatch           = "number of replace values does not match"
	ErrMsgUnknownFormatPlaceholder             = "%q is an unknown placeholder"
	ErrMsgFormatUnexpectedTermination          = "unexpected termination of format string"
	ErrMsgExternalCommand                      = "external command: %s"
	ErrMsgHttpRequest                          = "failed to get resource from %s: %s"
	ErrMsgInvalidReloadType                    = "%s is an unknown reload type"
	ErrMsgLoadConfiguration                    = "configuration loading error: %s"
	ErrMsgDuplicateStatementName               = "statement %s is a duplicate"
	ErrMsgStatementNotExist                    = "statement %s does not exist"
	ErrMsgStatementReplaceValueNotSpecified    = "replace value for %s is not specified"
	ErrMsgSelectIntoQueryFieldLengthNotMatch   = "select into query should return exactly %s"
	ErrMsgSelectIntoQueryTooManyRecords        = "select into query returns too many records, should return only one record"
	ErrMsgIntegerDevidedByZero                 = "integer divided by zero"
)
View Source
const (
	ReturnCodeApplicationError          = 1
	ReturnCodeIncorrectUsage            = 2
	ReturnCodeSyntaxError               = 4
	ReturnCodeContextDone               = 8
	ReturnCodeIOError                   = 16
	ReturnCodeSystemError               = 32
	ReturnCodeDefaultUserTriggeredError = 64
)
View Source
const (
	//Application Error
	ErrorFatal                                = 1
	ErrorCannotDetectFileEncoding             = 10001
	ErrorFieldAmbiguous                       = 10101
	ErrorFieldNotExist                        = 10102
	ErrorFieldNotGroupKey                     = 10103
	ErrorDuplicateFieldName                   = 10104
	ErrorNotGroupingRecords                   = 10201
	ErrorNotAllowedAnalyticFunction           = 10202
	ErrorUndeclaredVariable                   = 10301
	ErrorVariableRedeclared                   = 10302
	ErrorUndefinedConstant                    = 10321
	ErrorInvalidUrl                           = 10341
	ErrorUnsupportedUrlScheme                 = 10342
	ErrorFunctionNotExist                     = 10401
	ErrorFunctionArgumentsLength              = 10402
	ErrorFunctionInvalidArgument              = 10403
	ErrorFunctionRedeclared                   = 10501
	ErrorBuiltInFunctionDeclared              = 10502
	ErrorDuplicateParameter                   = 10503
	ErrorSubqueryTooManyRecords               = 10601
	ErrorSubqueryTooManyFields                = 10602
	ErrorJsonQueryTooManyRecords              = 10701
	ErrorLoadJson                             = 10702
	ErrorEmptyJsonQuery                       = 10703 // Not in use after v1.14.0
	ErrorJsonLinesStructure                   = 10704
	ErrorEmptyJsonTable                       = 10801 // Not in use after v1.14.0
	ErrorIncorrectLateralUsage                = 10802
	ErrorEmptyInlineTable                     = 10803
	ErrorInvalidTableObject                   = 10901
	ErrorTableObjectInvalidDelimiter          = 10902
	ErrorTableObjectInvalidDelimiterPositions = 10903
	ErrorTableObjectInvalidJsonQuery          = 10904
	ErrorTableObjectArgumentsLength           = 10905
	ErrorTableObjectJsonArgumentsLength       = 10906
	ErrorTableObjectInvalidArgument           = 10907
	ErrorCursorRedeclared                     = 11001
	ErrorUndeclaredCursor                     = 11002
	ErrorCursorClosed                         = 11003
	ErrorCursorOpen                           = 11004
	ErrorInvalidCursorStatement               = 11005
	ErrorPseudoCursor                         = 11006
	ErrorCursorFetchLength                    = 11007
	ErrorInvalidFetchPosition                 = 11008
	ErrorInlineTableRedefined                 = 11101
	ErrorUndefinedInlineTable                 = 11102
	ErrorInlineTableFieldLength               = 11103
	ErrorFileNameAmbiguous                    = 11201
	ErrorDataParsing                          = 11301
	ErrorDataEncoding                         = 11351
	ErrorTableFieldLength                     = 11401
	ErrorTemporaryTableRedeclared             = 11501
	ErrorUndeclaredTemporaryTable             = 11502
	ErrorTemporaryTableFieldLength            = 11503
	ErrorDuplicateTableName                   = 11601
	ErrorTableNotLoaded                       = 11602
	ErrorStdinEmpty                           = 11603
	ErrorInlineTableCannotBeUpdated           = 11604
	ErrorAliasMustBeSpecifiedForUpdate        = 11605
	ErrorRowValueLengthInComparison           = 11701
	ErrorFieldLengthInComparison              = 11702
	ErrorInvalidLimitPercentage               = 11801
	ErrorInvalidLimitNumber                   = 11802
	ErrorInvalidOffsetNumber                  = 11901
	ErrorCombinedSetFieldLength               = 12001
	ErrorRecursionExceededLimit               = 12002
	ErrorNestedRecursion                      = 12003
	ErrorInsertRowValueLength                 = 12101
	ErrorInsertSelectFieldLength              = 12102
	ErrorUpdateFieldNotExist                  = 12201
	ErrorUpdateValueAmbiguous                 = 12202
	ErrorDeleteTableNotSpecified              = 12301
	ErrorShowInvalidObjectType                = 12401
	ErrorReplaceValueLength                   = 12501
	ErrorSourceInvalidFilePath                = 12601
	ErrorInvalidFlagName                      = 12701
	ErrorFlagValueNowAllowedFormat            = 12702
	ErrorInvalidFlagValue                     = 12703
	ErrorAddFlagNotSupportedName              = 12801
	ErrorRemoveFlagNotSupportedName           = 12802
	ErrorInvalidFlagValueToBeRemoved          = 12803
	ErrorInvalidRuntimeInformation            = 12901
	ErrorNotTable                             = 13001
	ErrorInvalidTableAttributeName            = 13002
	ErrorTableAttributeValueNotAllowedFormat  = 13003
	ErrorInvalidTableAttributeValue           = 13004
	ErrorInvalidEventName                     = 13101
	ErrorInternalRecordIdNotExist             = 13201
	ErrorInternalRecordIdEmpty                = 13202
	ErrorFieldLengthNotMatch                  = 13301
	ErrorRowValueLengthInList                 = 13401
	ErrorFormatStringLengthNotMatch           = 13501
	ErrorUnknownFormatPlaceholder             = 13502
	ErrorFormatUnexpectedTermination          = 13503
	ErrorInvalidReloadType                    = 13601
	ErrorLoadConfiguration                    = 13701
	ErrorDuplicateStatementName               = 13801
	ErrorStatementNotExist                    = 13802
	ErrorStatementReplaceValueNotSpecified    = 13803
	ErrorReplaceKeyNotSet                     = 13901
	ErrorSelectIntoQueryFieldLengthNotMatch   = 14001
	ErrorSelectIntoQueryTooManyRecords        = 14002
	ErrorIntegerDevidedByZero                 = 30000

	//Incorrect Command Usage
	ErrorIncorrectCommandUsage = 90020

	//Syntax Error
	ErrorSyntaxError                  = 90040
	ErrorInvalidValueExpression       = 90041
	ErrorNestedAggregateFunctions     = 90042
	ErrorPreparedStatementSyntaxError = 90043

	//Context Error
	ErrorContextDone     = 90080
	ErrorContextCanceled = 90081
	ErrorFileLockTimeout = 90082

	//IO Error
	ErrorIO               = 90160
	ErrorCommit           = 90171
	ErrorRollback         = 90172
	ErrorInvalidPath      = 90180
	ErrorFileNotExist     = 90181
	ErrorFileAlreadyExist = 90182
	ErrorFileUnableToRead = 90183

	//System Error
	ErrorSystemError      = 90320
	ErrorExternalCommand  = 30330
	ErrorHttpRequestError = 30400

	//User Triggered Error
	ErrorExit          = 90640
	ErrorUserTriggered = 90650
)
View Source
const (
	TableDelimiter          = "DELIMITER"
	TableDelimiterPositions = "DELIMITER_POSITIONS"
	TableFormat             = "FORMAT"
	TableEncoding           = "ENCODING"
	TableLineBreak          = "LINE_BREAK"
	TableHeader             = "HEADER"
	TableEncloseAll         = "ENCLOSE_ALL"
	TableJsonEscape         = "JSON_ESCAPE"
	TablePrettyPrint        = "PRETTY_PRINT"
)
View Source
const (
	UncommittedInformation  = "UNCOMMITTED"
	CreatedInformation      = "CREATED"
	UpdatedInformation      = "UPDATED"
	UpdatedViewsInformation = "UPDATED_VIEWS"
	LoadedTablesInformation = "LOADED_TABLES"
	WorkingDirectory        = "WORKING_DIRECTORY"
	VersionInformation      = "VERSION"
)
View Source
const DefaultScreenWidth = 75
View Source
const DefaultUserTriggeredErrorMessage = "triggered error"
View Source
const EOF = -1
View Source
const ExitMessage = "exit"
View Source
const IgnoredFlagPrefix = "(ignored) "
View Source
const InternalIdColumn = "@__internal_id"
View Source
const LimitToUseFieldIndexSliceChache = 8
View Source
const LimitToUseUintSlicePool = 20
View Source
const MinimumRequiredPerCPUCore = 80
View Source
const (
	ReloadConfig = "CONFIG"
)
View Source
const StatementReplaceValuesContextKey = "rv"
View Source
const StoringResultsContextKey = "sqr"

Variables

View Source
var AggregateFunctions = map[string]AggregateFunction{
	"COUNT":  Count,
	"MAX":    Max,
	"MIN":    Min,
	"SUM":    Sum,
	"AVG":    Avg,
	"STDEV":  StdEV,
	"STDEVP": StdEVP,
	"VAR":    Var,
	"VARP":   VarP,
	"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 DataEmpty = errors.New("data empty")
View Source
var EmptyResultSetError = errors.New("empty result set")
View Source
var Functions = map[string]BuiltInFunction{}/* 124 elements not displayed */
View Source
var RegExps = NewRegExpMap()
View Source
var Version = "v1.18.1"

Functions

func Abs

func Abs(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Acos

func Acos(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Acosh added in v1.17.7

func Acosh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func AddDay

func AddDay(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddFlagElement added in v1.6.5

func AddFlagElement(ctx context.Context, scope *ReferenceScope, expr parser.AddFlagElement) error

func AddHour

func AddHour(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddMicro

func AddMicro(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddMilli

func AddMilli(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddMinute

func AddMinute(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddMonth

func AddMonth(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddNano

func AddNano(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddSecond

func AddSecond(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func AddYear

func AddYear(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func All

func All(rowValue value.RowValue, list []value.RowValue, operator string, datetimeFormats []string, location *time.Location) (ternary.Value, error)

func Analyze added in v0.5.6

func Analyze(ctx context.Context, scope *ReferenceScope, view *View, fn parser.AnalyticFunction, partitionIndices []int) error

func Any

func Any(rowValue value.RowValue, list []value.RowValue, operator string, datetimeFormats []string, location *time.Location) (ternary.Value, error)

func Asin

func Asin(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Asinh added in v1.17.7

func Asinh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Atan

func Atan(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Atan2

func Atan2(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Atanh added in v1.17.7

func Atanh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Avg

func Avg(list []value.Primary, _ *option.Flags) value.Primary

func Base64Decode

func Base64Decode(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Base64Encode

func Base64Encode(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Bin

func Bin(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func BinToDec

func BinToDec(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Boolean

func Boolean(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func ByteLen

func ByteLen(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func CalcMinimumRequired added in v1.7.3

func CalcMinimumRequired(i1 int, i2 int, defaultMinimumRequired int) int

func Calculate

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

func Call added in v0.1.8

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

func Cbrt added in v1.17.7

func Cbrt(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Ceil

func Ceil(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Chdir added in v1.6.2

func Chdir(ctx context.Context, scope *ReferenceScope, expr parser.Chdir) 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, _ *option.Flags) (value.Primary, error)

func ContextForPreparedStatement added in v1.9.4

func ContextForPreparedStatement(ctx context.Context, values *ReplaceValues) context.Context

func ContextForStoringResults added in v1.9.3

func ContextForStoringResults(ctx context.Context) context.Context

func ConvertContextError added in v1.9.15

func ConvertContextError(err error) error

func ConvertFieldContents added in v1.6.0

func ConvertFieldContents(val value.Primary, forTextTable bool, useScientificNotation bool) (string, string, text.FieldAlignment)

func ConvertFileHandlerError added in v1.9.3

func ConvertFileHandlerError(err error, ident parser.Identifier) error

func ConvertLoadConfigurationError added in v1.9.8

func ConvertLoadConfigurationError(err error) error

func ConvertTableFunction added in v1.17.8

func ConvertTableFunction(ctx context.Context, scope *ReferenceScope, tableFunction parser.TableFunction) (parser.QueryExpression, error)

func ConvertUrlExpr added in v1.17.8

func ConvertUrlExpr(urlExpr parser.Url) (parser.QueryExpression, error)

func Cos

func Cos(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Cosh added in v1.17.7

func Cosh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Count

func Count(list []value.Primary, _ *option.Flags) value.Primary

func CreateFilePath added in v1.5.0

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

func CrossJoin

func CrossJoin(ctx context.Context, scope *ReferenceScope, view *View, joinView *View) error

func DateDiff

func DateDiff(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Datetime

func Datetime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func DatetimeFormat

func DatetimeFormat(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Day

func Day(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func DayOfYear

func DayOfYear(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func DeclareView added in v0.8.6

func DeclareView(ctx context.Context, scope *ReferenceScope, expr parser.ViewDeclaration) error

func Distinguish added in v0.4.10

func Distinguish(list []value.Primary, flags *option.Flags) []value.Primary

func Echo added in v1.6.2

func Echo(ctx context.Context, scope *ReferenceScope, expr parser.Echo) (string, error)

func EncodeView added in v0.1.6

func EncodeView(ctx context.Context, fp io.Writer, view *View, options option.ExportOptions, palette *color.Palette) (string, error)

func Enotation added in v0.5.12

func Enotation(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func EnotationToDec added in v0.5.12

func EnotationToDec(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func EvalRowValue added in v1.9.17

func EvalRowValue(ctx context.Context, scope *ReferenceScope, expr parser.QueryExpression) (value.RowValue, error)

EvalRowValue returns single or multiple fields, single record

func Evaluate added in v1.9.17

func Evaluate(ctx context.Context, scope *ReferenceScope, expr parser.QueryExpression) (value.Primary, error)

func EvaluateEmbeddedString added in v1.9.17

func EvaluateEmbeddedString(ctx context.Context, scope *ReferenceScope, embedded string) (string, error)

func EvaluateSequentially added in v1.9.17

func EvaluateSequentially(ctx context.Context, scope *ReferenceScope, view *View, fn func(*ReferenceScope, int) error) error

func Exp

func Exp(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Exp2

func Exp2(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Expm1

func Expm1(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func FetchCursor added in v0.1.8

func FetchCursor(ctx context.Context, scope *ReferenceScope, name parser.Identifier, fetchPosition parser.FetchPosition, vars []parser.Variable) (bool, error)

func Float

func Float(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Floor

func Floor(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Format added in v0.5.0

func Format(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func FormatCount added in v0.4.3

func FormatCount(i int, obj string) string

func FormatFieldIdentifier added in v1.17.8

func FormatFieldIdentifier(e parser.QueryExpression) string

func FormatFieldLabel added in v1.17.8

func FormatFieldLabel(e parser.QueryExpression) string

func FormatTableName added in v1.17.8

func FormatTableName(s string) string

func GetComparisonKeysBuf added in v1.9.17

func GetComparisonKeysBuf() *bytes.Buffer

func GetRuntimeInformation added in v1.6.2

func GetRuntimeInformation(tx *Transaction, expr parser.RuntimeInformation) (value.Primary, error)

func GetValuesInOrderByClause added in v1.17.1

func GetValuesInOrderByClause(e parser.OrderByClause) []parser.QueryExpression

func HasAggregateFunction added in v1.17.1

func HasAggregateFunction(expr parser.QueryExpression, scope *ReferenceScope) (bool, error)

func HasAggregateFunctionInList added in v1.17.1

func HasAggregateFunctionInList(list []parser.QueryExpression, scope *ReferenceScope) (bool, error)

func Hex

func Hex(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func HexDecode

func HexDecode(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func HexEncode

func HexEncode(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func HexToDec

func HexToDec(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Hour

func Hour(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func If

func If(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Ifnull

func Ifnull(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func InRowValueList added in v0.2.2

func InRowValueList(rowValue value.RowValue, list []value.RowValue, matchType int, operator string, datetimeFormats []string, location *time.Location) (ternary.Value, error)

func InStrSliceWithCaseInsensitive added in v0.4.3

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

func InnerJoin

func InnerJoin(ctx context.Context, scope *ReferenceScope, view *View, joinView *View, condition parser.QueryExpression) error

func Instr added in v1.1.1

func Instr(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Integer

func Integer(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Is

func IsInf added in v1.17.7

func IsInf(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func IsNaN added in v1.17.7

func IsNaN(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func JsonAgg added in v1.3.0

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

func JsonObject added in v1.3.0

func JsonObject(ctx context.Context, scope *ReferenceScope, fn parser.Function) (value.Primary, error)

func JsonValue added in v1.3.0

func JsonValue(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Len

func Len(fn parser.Function, args []value.Primary, _ *option.Flags) (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, _ *option.Flags) (value.Primary, error)

func LoadContentsFromFile added in v1.9.8

func LoadContentsFromFile(ctx context.Context, tx *Transaction, fpath parser.Identifier) (content string, err error)

func LoadStatementsFromFile added in v1.6.0

func LoadStatementsFromFile(ctx context.Context, tx *Transaction, fpath parser.Identifier) (statements []parser.Statement, err error)

func Log10

func Log10(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Log1p

func Log1p(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Log2

func Log2(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Logb added in v1.17.7

func Logb(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Lower

func Lower(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Lpad

func Lpad(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Ltrim

func Ltrim(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func MathLog added in v0.7.1

func MathLog(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Max

func Max(list []value.Primary, flags *option.Flags) value.Primary

func Md5

func Md5(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Md5Hmac

func Md5Hmac(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Median added in v0.5.5

func Median(list []value.Primary, flags *option.Flags) value.Primary

func Microsecond

func Microsecond(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func MilliToDatetime added in v1.17.7

func MilliToDatetime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Millisecond

func Millisecond(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Min

func Min(list []value.Primary, flags *option.Flags) value.Primary

func Minute

func Minute(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Month

func Month(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func NanoToDatetime added in v1.10.3

func NanoToDatetime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Nanosecond

func Nanosecond(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func NewAddFlagNotSupportedNameError added in v1.6.5

func NewAddFlagNotSupportedNameError(expr parser.AddFlagElement) error

func NewAliasMustBeSpecifiedForUpdateError added in v1.17.8

func NewAliasMustBeSpecifiedForUpdateError(expr parser.QueryExpression) error

func NewBuiltInFunctionDeclaredError added in v0.4.3

func NewBuiltInFunctionDeclaredError(expr parser.Identifier) error

func NewCannotDetectFileEncodingError added in v1.10.0

func NewCannotDetectFileEncodingError(file parser.QueryExpression) error

func NewCombinedSetFieldLengthError added in v0.4.3

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

func NewCommitError added in v1.6.0

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

func NewContextCanceled added in v1.9.10

func NewContextCanceled(message string) error

func NewContextDone added in v1.9.10

func NewContextDone(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 NewDataEncodingError added in v1.10.1

func NewDataEncodingError(message string) 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 NewDuplicateStatementNameError added in v1.9.4

func NewDuplicateStatementNameError(name parser.Identifier) error

func NewDuplicateTableNameError added in v0.4.3

func NewDuplicateTableNameError(table parser.Identifier) error

func NewEmptyInlineTableError added in v1.15.0

func NewEmptyInlineTableError(expr parser.FormatSpecifiedFunction) error

func NewExternalCommandError added in v1.6.2

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

func NewFatalError added in v1.17.11

func NewFatalError(panicReport interface{}) error

func NewFieldAmbiguousError added in v0.4.0

func NewFieldAmbiguousError(field parser.QueryExpression) error

func NewFieldLengthNotMatchError added in v0.4.3

func NewFieldLengthNotMatchError(expr parser.QueryExpression) 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) 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.QueryExpression) 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 NewFormatUnexpectedTerminationError added in v1.5.3

func NewFormatUnexpectedTerminationError() 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 NewHttpRequestError added in v1.15.0

func NewHttpRequestError(expr parser.Expression, url string, message string) error

func NewIOError added in v1.9.8

func NewIOError(expr parser.QueryExpression, message string) error

func NewInLineTableRedefinedError added in v0.8.7

func NewInLineTableRedefinedError(table parser.Identifier) error

func NewIncorrectCommandUsageError added in v1.9.8

func NewIncorrectCommandUsageError(message string) error

func NewIncorrectLateralUsageError added in v1.13.0

func NewIncorrectLateralUsageError(expr parser.Table) error

func NewInlineTableCannotBeUpdatedError added in v1.17.8

func NewInlineTableCannotBeUpdatedError(expr parser.QueryExpression) 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 NewIntegerDevidedByZeroError added in v1.17.7

func NewIntegerDevidedByZeroError(expr parser.Arithmetic) error

func NewInternalRecordIdEmptyError added in v0.4.3

func NewInternalRecordIdEmptyError() error

func NewInternalRecordIdNotExistError added in v0.4.3

func NewInternalRecordIdNotExistError() error

func NewInvalidCursorStatementError added in v1.9.6

func NewInvalidCursorStatementError(statement parser.Identifier) 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.Flag) error

func NewInvalidFlagValueError added in v0.4.3

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

func NewInvalidFlagValueToBeRemovedError added in v1.6.5

func NewInvalidFlagValueToBeRemovedError(unsetFlag parser.RemoveFlagElement) 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 NewInvalidPathError added in v1.9.4

func NewInvalidPathError(expr parser.Expression, path string, message string) error

func NewInvalidReloadTypeError added in v1.6.2

func NewInvalidReloadTypeError(expr parser.Reload, name string) error

func NewInvalidRuntimeInformationError added in v1.6.2

func NewInvalidRuntimeInformationError(expr parser.RuntimeInformation) 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 NewInvalidTableObjectError added in v1.9.4

func NewInvalidTableObjectError(expr parser.FormatSpecifiedFunction, objectName string) error

func NewInvalidUrlError added in v1.17.8

func NewInvalidUrlError(expr parser.Url) error

func NewInvalidValueExpressionError added in v1.9.4

func NewInvalidValueExpressionError(expr parser.QueryExpression) error

func NewJsonLinesStructureError added in v1.16.0

func NewJsonLinesStructureError(expr parser.QueryExpression) error

func NewJsonQueryTooManyRecordsError added in v1.3.0

func NewJsonQueryTooManyRecordsError(expr parser.JsonQuery) error

func NewLoadConfigurationError added in v1.6.2

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

func NewLoadJsonError added in v1.9.4

func NewLoadJsonError(expr parser.QueryExpression, message string) error

func NewNestedAggregateFunctionsError added in v0.4.3

func NewNestedAggregateFunctionsError(expr parser.QueryExpression) error

func NewNestedRecursionError added in v1.11.1

func NewNestedRecursionError(expr parser.QueryExpression) error

func NewNotAllowedAnalyticFunctionError added in v1.17.1

func NewNotAllowedAnalyticFunctionError(expr parser.AnalyticFunction) 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 NewPreparedStatementSyntaxError added in v1.9.4

func NewPreparedStatementSyntaxError(err *parser.SyntaxError) error

func NewPseudoCursorError added in v0.4.10

func NewPseudoCursorError(cursor parser.Identifier) error

func NewRecursionExceededLimitError added in v1.9.17

func NewRecursionExceededLimitError(selectEntity parser.QueryExpression, limit int64) error

func NewRemoveFlagNotSupportedNameError added in v1.6.5

func NewRemoveFlagNotSupportedNameError(expr parser.RemoveFlagElement) error

func NewReplaceKeyNotSetError added in v1.9.13

func NewReplaceKeyNotSetError(key parser.QueryExpression) error

func NewReplaceValueLengthError added in v1.5.3

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

func NewRollbackError added in v1.6.0

func NewRollbackError(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 NewSelectIntoQueryFieldLengthNotMatchError added in v1.9.14

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

func NewSelectIntoQueryTooManyRecordsError added in v1.9.14

func NewSelectIntoQueryTooManyRecordsError(query parser.SelectQuery) error

func NewShowInvalidObjectTypeError added in v1.5.0

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

func NewSignalReceived added in v1.9.9

func NewSignalReceived(sig os.Signal) error

func NewSourceInvalidFilePathError added in v1.5.3

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

func NewStatementNotExistError added in v1.9.4

func NewStatementNotExistError(name parser.Identifier) error

func NewStatementReplaceValueNotSpecifiedError added in v1.9.4

func NewStatementReplaceValueNotSpecifiedError(placeholder parser.Placeholder) 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(err *parser.SyntaxError) error

func NewSystemError added in v1.9.3

func NewSystemError(message string) error

func NewTableAttributeUnchangedError added in v1.6.2

func NewTableAttributeUnchangedError(fpath string) 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.FormatSpecifiedFunction, argLen int) error

func NewTableObjectInvalidArgumentError added in v1.5.0

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

func NewTableObjectInvalidDelimiterError added in v1.5.0

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

func NewTableObjectInvalidDelimiterPositionsError added in v1.5.0

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

func NewTableObjectInvalidJsonQueryError added in v1.5.0

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

func NewTableObjectJsonArgumentsLengthError added in v1.5.0

func NewTableObjectJsonArgumentsLengthError(expr parser.FormatSpecifiedFunction, argLen int) 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.QueryExpression) error

func NewUndeclaredVariableError added in v0.8.7

func NewUndeclaredVariableError(expr parser.Variable) error

func NewUndefinedConstantError added in v1.17.7

func NewUndefinedConstantError(expr parser.Constant) error

func NewUndefinedInLineTableError added in v0.4.3

func NewUndefinedInLineTableError(table parser.Identifier) error

func NewUnknownFormatPlaceholderError added in v1.5.3

func NewUnknownFormatPlaceholderError(placeholder rune) error

func NewUnsupportedUrlSchemeError added in v1.17.8

func NewUnsupportedUrlSchemeError(expr parser.Url, scheme 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 NormalizeTableObject added in v1.17.8

func NormalizeTableObject(ctx context.Context, scope *ReferenceScope, tableObject parser.QueryExpression) (parser.QueryExpression, error)

func Now

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

func Nullif

func Nullif(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func NumberFormat added in v1.5.3

func NumberFormat(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Oct

func Oct(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func OctToDec

func OctToDec(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func OuterJoin

func OuterJoin(ctx context.Context, scope *ReferenceScope, view *View, joinView *View, condition parser.QueryExpression, direction int) error

func ParseExecuteStatements added in v1.5.3

func ParseExecuteStatements(ctx context.Context, scope *ReferenceScope, expr parser.Execute) ([]parser.Statement, error)

func ParseJoinCondition

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

func ParseTableName added in v1.17.8

func ParseTableName(ctx context.Context, scope *ReferenceScope, table parser.Table) (parser.Identifier, error)

func Pow

func Pow(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Print added in v0.1.6

func Print(ctx context.Context, scope *ReferenceScope, expr parser.Print) (string, error)

func Printf added in v0.4.0

func Printf(ctx context.Context, scope *ReferenceScope, expr parser.Printf) (string, error)

func PutBlockScope added in v1.9.17

func PutBlockScope(scope BlockScope)

func PutComparisonkeysBuf added in v1.9.17

func PutComparisonkeysBuf(buf *bytes.Buffer)

func PutNodeScope added in v1.9.17

func PutNodeScope(scope NodeScope)

func Pwd added in v1.6.2

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

func Rand

func Rand(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func RegExpFind added in v1.15.0

func RegExpFind(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func RegExpFindAll added in v1.15.0

func RegExpFindAll(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func RegExpFindSubMatches added in v1.15.0

func RegExpFindSubMatches(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func RegExpMatch added in v1.15.0

func RegExpMatch(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func RegExpReplace added in v1.15.0

func RegExpReplace(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Reload added in v1.6.2

func Reload(ctx context.Context, tx *Transaction, expr parser.Reload) error

func RemoveFlagElement added in v1.6.5

func RemoveFlagElement(ctx context.Context, scope *ReferenceScope, expr parser.RemoveFlagElement) error

func ReplaceFn added in v1.9.13

func ReplaceFn(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Round

func Round(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Rpad

func Rpad(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Rtrim

func Rtrim(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func SearchAnalyticFunctions added in v1.17.1

func SearchAnalyticFunctions(expr parser.QueryExpression) ([]parser.AnalyticFunction, error)

func SearchAnalyticFunctionsInList added in v1.17.1

func SearchAnalyticFunctionsInList(list []parser.QueryExpression) ([]parser.AnalyticFunction, 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, options option.ImportOptions, defaultFormat option.Format) (string, option.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 SearchJsonlFilePath added in v1.16.0

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

func SearchLTSVFilePath added in v1.8.0

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

func Second

func Second(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func SerializeComparisonKeys added in v0.6.4

func SerializeComparisonKeys(buf *bytes.Buffer, values []value.Primary, flags *option.Flags)

func SerializeIdenticalKey added in v1.13.7

func SerializeIdenticalKey(buf *bytes.Buffer, val value.Primary)

func SerializeKey added in v0.6.6

func SerializeKey(buf *bytes.Buffer, val value.Primary, flags *option.Flags)

func SetEnvVar added in v1.6.0

func SetEnvVar(ctx context.Context, scope *ReferenceScope, expr parser.SetEnvVar) error

func SetFlag added in v0.1.6

func SetFlag(ctx context.Context, scope *ReferenceScope, expr parser.SetFlag) error

func Sha1

func Sha1(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sha1Hmac

func Sha1Hmac(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sha256

func Sha256(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sha256Hmac

func Sha256Hmac(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sha512

func Sha512(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sha512Hmac

func Sha512Hmac(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func ShowFields added in v0.8.6

func ShowFields(ctx context.Context, scope *ReferenceScope, expr parser.ShowFields) (string, error)

func ShowFlag added in v0.8.0

func ShowFlag(tx *Transaction, expr parser.ShowFlag) (string, error)

func ShowObjects added in v0.8.6

func ShowObjects(scope *ReferenceScope, expr parser.ShowObjects) (string, error)

func Sin

func Sin(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sinh added in v1.17.7

func Sinh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Source added in v0.4.0

func Source(ctx context.Context, scope *ReferenceScope, expr parser.Source) ([]parser.Statement, error)

func Sqrt

func Sqrt(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func StdEV added in v1.11.2

func StdEV(list []value.Primary, _ *option.Flags) value.Primary

func StdEVP added in v1.11.2

func StdEVP(list []value.Primary, _ *option.Flags) value.Primary

func String

func String(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Substr

func Substr(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Substring added in v1.11.6

func Substring(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Sum

func Sum(list []value.Primary, _ *option.Flags) value.Primary

func Syntax added in v1.7.2

func Syntax(ctx context.Context, scope *ReferenceScope, expr parser.Syntax) (string, error)

func Tan

func Tan(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Tanh added in v1.17.7

func Tanh(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Ternary

func Ternary(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func TimeDiff

func TimeDiff(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TimeNanoDiff added in v0.7.0

func TimeNanoDiff(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TitleCase added in v1.17.0

func TitleCase(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Trim

func Trim(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func TruncDay added in v0.7.0

func TruncDay(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncMicro added in v0.7.0

func TruncMicro(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncMilli added in v0.7.0

func TruncMilli(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncMinute added in v0.7.0

func TruncMinute(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncMonth added in v0.7.0

func TruncMonth(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncNano added in v0.7.0

func TruncNano(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncSecond added in v0.7.0

func TruncSecond(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func TruncTime added in v0.7.0

func TruncTime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func UTC added in v0.7.0

func UTC(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func UnixNanoTime

func UnixNanoTime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func UnixTime

func UnixTime(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func UnsetEnvVar added in v1.6.0

func UnsetEnvVar(expr parser.UnsetEnvVar) error

func Upper

func Upper(fn parser.Function, args []value.Primary, _ *option.Flags) (value.Primary, error)

func Var added in v1.11.2

func Var(list []value.Primary, _ *option.Flags) value.Primary

func VarP added in v1.11.2

func VarP(list []value.Primary, _ *option.Flags) value.Primary

func WeekOfYear

func WeekOfYear(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Weekday

func Weekday(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Width added in v1.5.0

func Width(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

func Year

func Year(fn parser.Function, args []value.Primary, flags *option.Flags) (value.Primary, error)

Types

type AddFlagNotSupportedNameError added in v1.6.5

type AddFlagNotSupportedNameError struct {
	*BaseError
}

type AggregateFunction added in v0.5.6

type AggregateFunction func([]value.Primary, *option.Flags) 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) Clear added in v1.9.15

func (m AliasMap) Clear()

func (AliasMap) Get added in v0.4.3

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

type AliasMustBeSpecifiedForUpdateError added in v1.17.8

type AliasMustBeSpecifiedForUpdateError struct {
	*BaseError
}

type AnalyticFunction added in v0.5.6

type AnalyticFunction interface {
	CheckArgsLen(expr parser.AnalyticFunction) error
	Execute(context.Context, *ReferenceScope, Partition, parser.AnalyticFunction) (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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (map[int]value.Primary, error)

type BaseError added in v0.4.3

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

func NewBaseError added in v0.4.3

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

func NewBaseErrorWithPrefix added in v1.6.0

func NewBaseErrorWithPrefix(prefix string, message string, code int, number int) *BaseError

func (*BaseError) Char added in v0.4.3

func (e *BaseError) Char() int

func (*BaseError) Code added in v0.5.0

func (e *BaseError) Code() int

func (*BaseError) Error added in v0.4.3

func (e *BaseError) Error() string

func (*BaseError) Line added in v0.4.3

func (e *BaseError) Line() int

func (*BaseError) Message added in v0.4.3

func (e *BaseError) Message() string

func (*BaseError) Number added in v1.9.4

func (e *BaseError) Number() int

func (*BaseError) Source added in v1.9.8

func (e *BaseError) Source() string

type BlockScope added in v1.9.17

type BlockScope struct {
	Variables       VariableMap
	TemporaryTables ViewMap
	Cursors         CursorMap
	Functions       UserDefinedFunctionMap
}

func GetBlockScope added in v1.9.17

func GetBlockScope() BlockScope

func NewBlockScope added in v1.9.17

func NewBlockScope() BlockScope

func (BlockScope) Clear added in v1.9.17

func (scope BlockScope) Clear()

type BuiltInFunction added in v1.9.17

type BuiltInFunction func(parser.Function, []value.Primary, *option.Flags) (value.Primary, error)

type BuiltInFunctionDeclaredError added in v0.4.3

type BuiltInFunctionDeclaredError struct {
	*BaseError
}

type CannotDetectFileEncodingError added in v1.10.0

type CannotDetectFileEncodingError struct {
	*BaseError
}

type Cell

type Cell []value.Primary

func NewCell

func NewCell(val value.Primary) Cell

func NewGroupCell

func NewGroupCell(values []value.Primary) Cell

type CombinedSetFieldLengthError added in v0.4.3

type CombinedSetFieldLengthError struct {
	*BaseError
}

type CommitError added in v1.6.0

type CommitError struct {
	*BaseError
}

type ContextCanceled added in v1.9.10

type ContextCanceled struct {
	*BaseError
}

type ContextDone added in v1.9.10

type ContextDone 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(_ context.Context, scope *ReferenceScope, partition Partition, _ parser.AnalyticFunction) (map[int]value.Primary, error)

type Cursor added in v0.1.8

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

func NewCursor added in v0.1.8

func NewCursor(e parser.CursorDeclaration) *Cursor

func NewPseudoCursor added in v0.4.10

func NewPseudoCursor(name string, 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(ctx context.Context, scope *ReferenceScope, name parser.Identifier, values []parser.ReplaceValue) 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 struct {
	*SyncMap
}

func NewCursorMap added in v1.9.19

func NewCursorMap() CursorMap

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) Delete added in v1.9.19

func (m CursorMap) Delete(name string)

func (CursorMap) Dispose added in v0.1.8

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

func (CursorMap) Exists added in v1.9.19

func (m CursorMap) Exists(name string) bool

func (CursorMap) Fetch added in v0.1.8

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

func (CursorMap) IsEmpty added in v1.9.19

func (m CursorMap) IsEmpty() bool

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) Load added in v1.9.19

func (m CursorMap) Load(name string) (*Cursor, bool)

func (CursorMap) LoadDirect added in v1.13.0

func (m CursorMap) LoadDirect(name string) (interface{}, bool)

func (CursorMap) Open added in v0.1.8

func (m CursorMap) Open(ctx context.Context, scope *ReferenceScope, name parser.Identifier, values []parser.ReplaceValue) error

func (CursorMap) Store added in v1.9.19

func (m CursorMap) Store(name string, val *Cursor)

type CursorOpenError added in v0.4.3

type CursorOpenError struct {
	*BaseError
}

type CursorRedeclaredError added in v0.4.3

type CursorRedeclaredError struct {
	*BaseError
}

type DataEncodingError added in v1.10.1

type DataEncodingError struct {
	*BaseError
}

type DataObject added in v1.17.8

type DataObject struct {
	*parser.BaseExpr
	Raw string
}

func (DataObject) String added in v1.17.8

func (o DataObject) String() string

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(_ context.Context, scope *ReferenceScope, partition Partition, _ parser.AnalyticFunction) (map[int]value.Primary, error)

type Direction added in v1.5.0

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

type Discard added in v1.9.3

type Discard struct {
}

func NewDiscard added in v1.9.3

func NewDiscard() *Discard

func (Discard) Close added in v1.9.3

func (d Discard) Close() error

func (Discard) Write added in v1.9.3

func (d Discard) Write(p []byte) (int, error)

type DuplicateFieldNameError added in v0.4.3

type DuplicateFieldNameError struct {
	*BaseError
}

type DuplicateParameterError added in v0.5.0

type DuplicateParameterError struct {
	*BaseError
}

type DuplicateStatementNameError added in v1.9.4

type DuplicateStatementNameError struct {
	*BaseError
}

type DuplicateTableNameError added in v0.4.3

type DuplicateTableNameError struct {
	*BaseError
}

type EmptyInlineTableError added in v1.15.0

type EmptyInlineTableError struct {
	*BaseError
}

type Error added in v1.2.0

type Error interface {
	Error() string
	Message() string
	Code() int
	Number() int
	Line() int
	Char() int
	Source() string
	// contains filtered or unexported methods
}

type ExternalCommandError added in v1.6.2

type ExternalCommandError struct {
	*BaseError
}

type FatalError added in v1.17.11

type FatalError struct {
	*BaseError
}

type FieldAmbiguousError added in v0.4.0

type FieldAmbiguousError struct {
	*BaseError
}

type FieldIndexCache added in v1.10.3

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

func NewFieldIndexCache added in v1.10.3

func NewFieldIndexCache(initCap int, limitToUseSlice int) *FieldIndexCache

func (*FieldIndexCache) Add added in v1.10.3

func (c *FieldIndexCache) Add(expr parser.QueryExpression, idx int)

func (*FieldIndexCache) Get added in v1.10.3

func (c *FieldIndexCache) Get(expr parser.QueryExpression) (int, bool)

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
	ArchivePath string

	Format             option.Format
	Delimiter          rune
	DelimiterPositions fixedlen.DelimiterPositions
	JsonQuery          string
	Encoding           text.Encoding
	LineBreak          text.LineBreak
	NoHeader           bool
	EncloseAll         bool
	JsonEscape         json.EscapeType
	PrettyPrint        bool

	SingleLine bool

	Handler *file.Handler

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

func AddColumns added in v0.1.6

func AddColumns(ctx context.Context, scope *ReferenceScope, query parser.AddColumns) (*FileInfo, int, error)

func CreateTable added in v0.1.6

func CreateTable(ctx context.Context, scope *ReferenceScope, query parser.CreateTable) (*FileInfo, error)

func Delete added in v0.1.6

func Delete(ctx context.Context, scope *ReferenceScope, query parser.DeleteQuery) ([]*FileInfo, []int, error)

func DropColumns added in v0.1.6

func DropColumns(ctx context.Context, scope *ReferenceScope, query parser.DropColumns) (*FileInfo, int, error)

func Insert added in v0.1.6

func Insert(ctx context.Context, scope *ReferenceScope, query parser.InsertQuery) (*FileInfo, int, error)

func NewFileInfo

func NewFileInfo(
	filename parser.Identifier,
	repository string,
	options option.ImportOptions,
	defaultFormat option.Format,
) (*FileInfo, error)

func NewFileInfoForCreate added in v0.5.3

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

func NewInlineFileInfo added in v1.17.8

func NewInlineFileInfo(filePath string, importOptions option.ImportOptions, exportOptions option.ExportOptions) *FileInfo

func NewStdinFileInfo added in v1.17.8

func NewStdinFileInfo(filePath string, importOptions option.ImportOptions, exportOptions option.ExportOptions) *FileInfo

func NewTemporaryTableFileInfo added in v1.17.8

func NewTemporaryTableFileInfo(name string) *FileInfo

func RenameColumn added in v0.1.6

func RenameColumn(ctx context.Context, scope *ReferenceScope, query parser.RenameColumn) (*FileInfo, error)

func Replace

func Replace(ctx context.Context, scope *ReferenceScope, query parser.ReplaceQuery) (*FileInfo, int, error)

func SetTableAttribute added in v1.5.0

func SetTableAttribute(ctx context.Context, scope *ReferenceScope, query parser.SetTableAttribute) (*FileInfo, string, error)

func Update added in v0.1.6

func Update(ctx context.Context, scope *ReferenceScope, query parser.UpdateQuery) ([]*FileInfo, []int, error)

func (*FileInfo) ExportOptions added in v1.13.0

func (f *FileInfo) ExportOptions(tx *Transaction) option.ExportOptions

func (*FileInfo) IdentifiedPath added in v1.17.9

func (f *FileInfo) IdentifiedPath() string

func (*FileInfo) IsFile added in v1.9.10

func (f *FileInfo) IsFile() bool

func (*FileInfo) IsInMemoryTable added in v1.17.8

func (f *FileInfo) IsInMemoryTable() bool

func (*FileInfo) IsInlineTable added in v1.17.9

func (f *FileInfo) IsInlineTable() bool

func (*FileInfo) IsRemoteObject added in v1.17.9

func (f *FileInfo) IsRemoteObject() bool

func (*FileInfo) IsStdin added in v1.9.10

func (f *FileInfo) IsStdin() bool

func (*FileInfo) IsStringObject added in v1.17.9

func (f *FileInfo) IsStringObject() bool

func (*FileInfo) IsTemporaryTable added in v1.9.10

func (f *FileInfo) IsTemporaryTable() bool

func (*FileInfo) IsUpdatable added in v1.17.8

func (f *FileInfo) IsUpdatable() bool

func (*FileInfo) SetAllDefaultFileInfoAttributes added in v1.17.8

func (f *FileInfo) SetAllDefaultFileInfoAttributes(importOptions option.ImportOptions, exportOptions option.ExportOptions)

func (*FileInfo) SetDefaultFileInfoAttributes added in v1.17.8

func (f *FileInfo) SetDefaultFileInfoAttributes(importOptions option.ImportOptions, exportOptions option.ExportOptions)

func (*FileInfo) SetDelimiter added in v1.5.0

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

func (*FileInfo) SetDelimiterPositions added in v1.9.0

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

func (*FileInfo) SetEncloseAll added in v1.6.0

func (f *FileInfo) SetEncloseAll(b bool) 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) SetJsonEscape added in v1.6.1

func (f *FileInfo) SetJsonEscape(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) error

func (*FileInfo) SetPrettyPrint added in v1.5.0

func (f *FileInfo) SetPrettyPrint(b bool) error

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 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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (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 {
	*BaseError
}

type FormatStringLengthNotMatchError added in v0.5.0

type FormatStringLengthNotMatchError struct {
	*BaseError
}

type FormatUnexpectedTerminationError added in v1.5.3

type FormatUnexpectedTerminationError 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 {
	Count                  int
	CountMutex             *sync.Mutex
	MinimumRequiredPerCore int
}

func GetGoroutineManager added in v1.6.6

func GetGoroutineManager() *GoroutineManager

func (*GoroutineManager) AssignRoutineNumber added in v1.6.6

func (m *GoroutineManager) AssignRoutineNumber(recordLen int, minimumRequiredPerCore int, cpuNum int) int

func (*GoroutineManager) Release added in v1.6.6

func (m *GoroutineManager) Release()

type GoroutineTaskManager added in v1.6.6

type GoroutineTaskManager struct {
	Number int
	// contains filtered or unexported fields
}

func NewGoroutineTaskManager added in v1.6.6

func NewGoroutineTaskManager(recordLen int, minimumRequiredPerCore int, cpuNum int) *GoroutineTaskManager

func (*GoroutineTaskManager) Add added in v1.6.6

func (m *GoroutineTaskManager) Add()

func (*GoroutineTaskManager) Done added in v1.6.6

func (m *GoroutineTaskManager) Done()

func (*GoroutineTaskManager) Err added in v1.6.6

func (m *GoroutineTaskManager) Err() error

func (*GoroutineTaskManager) HasError added in v1.6.6

func (m *GoroutineTaskManager) HasError() bool

func (*GoroutineTaskManager) RecordRange added in v1.6.6

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

func (*GoroutineTaskManager) Run added in v1.6.7

func (m *GoroutineTaskManager) Run(ctx context.Context, fn func(int) error) error

func (*GoroutineTaskManager) SetError added in v1.6.6

func (m *GoroutineTaskManager) SetError(e error)

func (*GoroutineTaskManager) Wait added in v1.6.6

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

func AddHeaderField

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

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) ContainsInternalId added in v0.7.2

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

func (Header) ContainsObject added in v0.2.3

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

func (Header) Copy added in v0.1.6

func (h Header) Copy() Header

func (Header) FieldIndex added in v1.10.1

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

func (Header) FieldNumberIndex added in v1.10.1

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

func (Header) Len

func (h Header) Len() int

func (Header) Merge added in v1.9.15

func (h Header) Merge(h2 Header) Header

func (Header) SearchIndex added in v1.10.1

func (h Header) SearchIndex(fieldRef parser.QueryExpression) (int, error)

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
	Identifier   string
	Column       string
	Aliases      []string
	Number       int
	IsFromTable  bool
	IsJoinColumn bool
	IsGroupKey   bool
}

type HttpObject added in v1.17.8

type HttpObject struct {
	*parser.BaseExpr
	URL string
}

func (HttpObject) String added in v1.17.8

func (o HttpObject) String() string

type HttpRequestError added in v1.15.0

type HttpRequestError struct {
	*BaseError
}

type IOError added in v1.9.8

type IOError struct {
	*BaseError
}

type InLineTableRedefinedError added in v0.8.7

type InLineTableRedefinedError struct {
	*BaseError
}

type IncorrectCommandUsageError added in v1.9.8

type IncorrectCommandUsageError struct {
	*BaseError
}

type IncorrectLateralUsageError added in v1.13.0

type IncorrectLateralUsageError struct {
	*BaseError
}

type InlineTableCannotBeUpdatedError added in v1.17.8

type InlineTableCannotBeUpdatedError 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) Clear added in v1.9.15

func (it InlineTableMap) Clear()

func (InlineTableMap) Exists added in v1.10.1

func (it InlineTableMap) Exists(name parser.Identifier) bool

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(ctx context.Context, scope *ReferenceScope, inlineTable parser.InlineTable) error

func (InlineTableMap) Store added in v1.13.0

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

type Input added in v1.9.8

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

func NewInput added in v1.9.8

func NewInput(r io.Reader) *Input

func (*Input) Close added in v1.9.8

func (r *Input) Close() error

func (*Input) Read added in v1.9.8

func (r *Input) Read(p []byte) (int, error)

type InsertRowValueLengthError added in v0.4.3

type InsertRowValueLengthError struct {
	*BaseError
}

type InsertSelectFieldLengthError added in v0.4.3

type InsertSelectFieldLengthError struct {
	*BaseError
}

type IntegerDevidedByZeroError added in v1.17.7

type IntegerDevidedByZeroError 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 InvalidCursorStatementError added in v1.9.6

type InvalidCursorStatementError 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 InvalidFlagValueToBeRemoveError added in v1.6.5

type InvalidFlagValueToBeRemoveError 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 InvalidPathError added in v1.9.4

type InvalidPathError struct {
	*BaseError
}

type InvalidReloadTypeError added in v1.6.2

type InvalidReloadTypeError struct {
	*BaseError
}

type InvalidRuntimeInformationError added in v1.6.2

type InvalidRuntimeInformationError 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 InvalidTableObjectError added in v1.9.4

type InvalidTableObjectError struct {
	*BaseError
}

type InvalidUrlError added in v1.17.8

type InvalidUrlError struct {
	*BaseError
}

type InvalidValueExpressionError added in v1.9.4

type InvalidValueExpressionError struct {
	*BaseError
}

type JsonLinesStructureError added in v1.16.0

type JsonLinesStructureError struct {
	*BaseError
}

type JsonQueryTooManyRecordsError added in v1.3.0

type JsonQueryTooManyRecordsError 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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (map[int]value.Primary, error)

type LoadConfigurationError added in v1.6.2

type LoadConfigurationError struct {
	*BaseError
}

type LoadJsonError added in v1.9.4

type LoadJsonError struct {
	*BaseError
}

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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (map[int]value.Primary, error)

type NestedAggregateFunctionsError added in v0.4.3

type NestedAggregateFunctionsError struct {
	*BaseError
}

type NestedRecursionError added in v1.11.1

type NestedRecursionError struct {
	*BaseError
}

type NodeScope added in v1.9.17

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

func GetNodeScope added in v1.9.17

func GetNodeScope() NodeScope

func NewNodeScope added in v1.9.17

func NewNodeScope() NodeScope

func (NodeScope) Clear added in v1.9.17

func (scope NodeScope) Clear()

type NotAllowedAnalyticFunctionError added in v1.17.1

type NotAllowedAnalyticFunctionError 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(ctx context.Context, scope *ReferenceScope, partition Partition, expr parser.AnalyticFunction) (map[int]value.Primary, error)

type ObjectStatus added in v1.5.0

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

type Output added in v1.9.8

type Output struct {
	bytes.Buffer
}

func NewOutput added in v1.9.8

func NewOutput() *Output

func (*Output) Close added in v1.9.8

func (w *Output) Close() error

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(_ context.Context, scope *ReferenceScope, partition Partition, _ parser.AnalyticFunction) (map[int]value.Primary, error)

type PreparedStatement added in v1.9.4

type PreparedStatement struct {
	Name            string
	StatementString string
	Statements      []parser.Statement
	HolderNumber    int
}

func NewPreparedStatement added in v1.9.4

func NewPreparedStatement(flags *option.Flags, expr parser.StatementPreparation) (*PreparedStatement, error)

type PreparedStatementMap added in v1.9.4

type PreparedStatementMap struct {
	*SyncMap
}

func NewPreparedStatementMap added in v1.9.7

func NewPreparedStatementMap() PreparedStatementMap

func (PreparedStatementMap) Delete added in v1.9.7

func (m PreparedStatementMap) Delete(name string)

func (PreparedStatementMap) Dispose added in v1.9.4

func (PreparedStatementMap) Exists added in v1.9.7

func (m PreparedStatementMap) Exists(name string) bool

func (PreparedStatementMap) Get added in v1.9.4

func (PreparedStatementMap) Load added in v1.9.7

func (PreparedStatementMap) LoadDirect added in v1.13.0

func (m PreparedStatementMap) LoadDirect(name string) (interface{}, bool)

func (PreparedStatementMap) Prepare added in v1.9.4

func (PreparedStatementMap) Store added in v1.9.7

func (m PreparedStatementMap) Store(name string, statement *PreparedStatement)

type PreparedStatementSyntaxError added in v1.9.4

type PreparedStatementSyntaxError struct {
	*BaseError
}

type Processor added in v1.9.3

type Processor struct {
	Tx             *Transaction
	ReferenceScope *ReferenceScope
	// contains filtered or unexported fields
}

func NewProcessor added in v1.9.3

func NewProcessor(tx *Transaction) *Processor

func NewProcessorWithScope added in v1.9.17

func NewProcessorWithScope(tx *Transaction, scope *ReferenceScope) *Processor

func (*Processor) AutoCommit added in v1.9.3

func (proc *Processor) AutoCommit(ctx context.Context) error

func (*Processor) AutoRollback added in v1.9.3

func (proc *Processor) AutoRollback() error

func (*Processor) Case added in v1.9.3

func (proc *Processor) Case(ctx context.Context, stmt parser.Case) (StatementFlow, error)

func (*Processor) Close added in v1.9.15

func (proc *Processor) Close()

func (*Processor) Commit added in v1.9.3

func (proc *Processor) Commit(ctx context.Context, expr parser.Expression) error

func (*Processor) ExecExternalCommand added in v1.9.3

func (proc *Processor) ExecExternalCommand(ctx context.Context, stmt parser.ExternalCommand) error

func (*Processor) Execute added in v1.9.3

func (proc *Processor) Execute(ctx context.Context, statements []parser.Statement) (StatementFlow, error)

func (*Processor) ExecuteStatement added in v1.9.3

func (proc *Processor) ExecuteStatement(ctx context.Context, stmt parser.Statement) (StatementFlow, error)

func (*Processor) IfStmt added in v1.9.3

func (proc *Processor) IfStmt(ctx context.Context, stmt parser.If) (StatementFlow, error)

func (*Processor) Log added in v1.9.3

func (proc *Processor) Log(log string, quiet bool)

func (*Processor) LogError added in v1.9.3

func (proc *Processor) LogError(log string)

func (*Processor) LogNotice added in v1.9.3

func (proc *Processor) LogNotice(log string, quiet bool)

func (*Processor) LogWarn added in v1.9.3

func (proc *Processor) LogWarn(log string, quiet bool)

func (*Processor) NewChildProcessor added in v1.9.3

func (proc *Processor) NewChildProcessor() *Processor

func (*Processor) ReleaseResources added in v1.9.3

func (proc *Processor) ReleaseResources() error

func (*Processor) ReleaseResourcesWithErrors added in v1.9.3

func (proc *Processor) ReleaseResourcesWithErrors() error

func (*Processor) Rollback added in v1.9.3

func (proc *Processor) Rollback(expr parser.Expression) error

func (*Processor) While added in v1.9.3

func (proc *Processor) While(ctx context.Context, stmt parser.While) (StatementFlow, error)

func (*Processor) WhileInCursor added in v1.9.3

func (proc *Processor) WhileInCursor(ctx context.Context, 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(_ context.Context, scope *ReferenceScope, partition Partition, _ parser.AnalyticFunction) (map[int]value.Primary, error)

type Record

type Record []Cell

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) Merge added in v1.9.15

func (r Record) Merge(r2 Record, pool *sync.Pool) Record

type RecordReader added in v1.5.0

type RecordReader interface {
	Read() ([]text.RawText, 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

func (RecordSet) Merge added in v1.9.17

func (r RecordSet) Merge(r2 RecordSet) RecordSet

type RecursionExceededLimitError added in v1.9.17

type RecursionExceededLimitError struct {
	*BaseError
}

type ReferenceRecord added in v1.9.17

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

func NewReferenceRecord added in v1.10.3

func NewReferenceRecord(view *View, recordIdx int, cacheLen int) ReferenceRecord

func (*ReferenceRecord) IsInRange added in v1.9.17

func (r *ReferenceRecord) IsInRange() bool

type ReferenceScope added in v1.9.17

type ReferenceScope struct {
	Tx *Transaction

	Blocks []BlockScope

	Records []ReferenceRecord

	RecursiveTable   *parser.InlineTable
	RecursiveTmpView *View
	RecursiveCount   *int64
	// contains filtered or unexported fields
}

func NewReferenceScope added in v1.9.17

func NewReferenceScope(tx *Transaction) *ReferenceScope

func NewReferenceScopeWithBlock added in v1.9.17

func NewReferenceScopeWithBlock(tx *Transaction, scope BlockScope) *ReferenceScope

func (*ReferenceScope) AddAlias added in v1.9.17

func (rs *ReferenceScope) AddAlias(alias parser.Identifier, path string) error

func (*ReferenceScope) AddPseudoCursor added in v1.9.17

func (rs *ReferenceScope) AddPseudoCursor(name parser.Identifier, values []value.Primary) error

func (*ReferenceScope) AllCursors added in v1.9.17

func (rs *ReferenceScope) AllCursors() CursorMap

func (*ReferenceScope) AllFunctions added in v1.9.17

func (*ReferenceScope) AllTemporaryTables added in v1.9.17

func (rs *ReferenceScope) AllTemporaryTables() ViewMap

func (*ReferenceScope) AllVariables added in v1.9.17

func (rs *ReferenceScope) AllVariables() VariableMap

func (*ReferenceScope) ClearCurrentBlock added in v1.9.17

func (rs *ReferenceScope) ClearCurrentBlock()

func (*ReferenceScope) CloseCurrentBlock added in v1.9.17

func (rs *ReferenceScope) CloseCurrentBlock()

func (*ReferenceScope) CloseCurrentNode added in v1.9.17

func (rs *ReferenceScope) CloseCurrentNode()

func (*ReferenceScope) CloseCursor added in v1.9.17

func (rs *ReferenceScope) CloseCursor(name parser.Identifier) error

func (*ReferenceScope) CreateChild added in v1.9.17

func (rs *ReferenceScope) CreateChild() *ReferenceScope

func (*ReferenceScope) CreateNode added in v1.9.17

func (rs *ReferenceScope) CreateNode() *ReferenceScope

func (*ReferenceScope) CreateScopeForAnalytics added in v1.9.17

func (rs *ReferenceScope) CreateScopeForAnalytics() *ReferenceScope

func (*ReferenceScope) CreateScopeForRecordEvaluation added in v1.9.17

func (rs *ReferenceScope) CreateScopeForRecordEvaluation(view *View, recordIndex int) *ReferenceScope

func (*ReferenceScope) CreateScopeForSequentialEvaluation added in v1.9.17

func (rs *ReferenceScope) CreateScopeForSequentialEvaluation(view *View) *ReferenceScope

func (*ReferenceScope) CurrentBlock added in v1.9.17

func (rs *ReferenceScope) CurrentBlock() BlockScope

func (*ReferenceScope) CursorCount added in v1.9.17

func (rs *ReferenceScope) CursorCount(name parser.Identifier) (int, error)

func (*ReferenceScope) CursorIsInRange added in v1.9.17

func (rs *ReferenceScope) CursorIsInRange(name parser.Identifier) (ternary.Value, error)

func (*ReferenceScope) CursorIsOpen added in v1.9.17

func (rs *ReferenceScope) CursorIsOpen(name parser.Identifier) (ternary.Value, error)

func (*ReferenceScope) DeclareAggregateFunction added in v1.9.17

func (rs *ReferenceScope) DeclareAggregateFunction(expr parser.AggregateDeclaration) error

func (*ReferenceScope) DeclareCursor added in v1.9.17

func (rs *ReferenceScope) DeclareCursor(expr parser.CursorDeclaration) error

func (*ReferenceScope) DeclareFunction added in v1.9.17

func (rs *ReferenceScope) DeclareFunction(expr parser.FunctionDeclaration) error

func (*ReferenceScope) DeclareVariable added in v1.9.17

func (rs *ReferenceScope) DeclareVariable(ctx context.Context, expr parser.VariableDeclaration) error

func (*ReferenceScope) DeclareVariableDirectly added in v1.9.17

func (rs *ReferenceScope) DeclareVariableDirectly(variable parser.Variable, val value.Primary) error

func (*ReferenceScope) DisposeCursor added in v1.9.17

func (rs *ReferenceScope) DisposeCursor(name parser.Identifier) error

func (*ReferenceScope) DisposeFunction added in v1.9.17

func (rs *ReferenceScope) DisposeFunction(name parser.Identifier) error

func (*ReferenceScope) DisposeTemporaryTable added in v1.9.17

func (rs *ReferenceScope) DisposeTemporaryTable(name parser.QueryExpression) error

func (*ReferenceScope) DisposeVariable added in v1.9.17

func (rs *ReferenceScope) DisposeVariable(expr parser.Variable) error

func (*ReferenceScope) FetchCursor added in v1.9.17

func (rs *ReferenceScope) FetchCursor(name parser.Identifier, position int, number int) ([]value.Primary, error)

func (*ReferenceScope) FilePathExists added in v1.17.8

func (rs *ReferenceScope) FilePathExists(identifier string) bool

func (*ReferenceScope) GetAlias added in v1.9.17

func (rs *ReferenceScope) GetAlias(alias parser.Identifier) (path string, err error)

func (*ReferenceScope) GetFunction added in v1.9.17

func (rs *ReferenceScope) GetFunction(expr parser.QueryExpression, name string) (*UserDefinedFunction, error)

func (*ReferenceScope) GetInlineTable added in v1.9.17

func (rs *ReferenceScope) GetInlineTable(name parser.Identifier) (*View, error)

func (*ReferenceScope) GetTemporaryTable added in v1.9.17

func (rs *ReferenceScope) GetTemporaryTable(identifier parser.Identifier) (*View, error)

func (*ReferenceScope) GetTemporaryTableWithInternalId added in v1.9.17

func (rs *ReferenceScope) GetTemporaryTableWithInternalId(ctx context.Context, identifier parser.Identifier, flags *option.Flags) (view *View, err error)

func (*ReferenceScope) GetVariable added in v1.9.17

func (rs *ReferenceScope) GetVariable(expr parser.Variable) (val value.Primary, err error)

func (*ReferenceScope) Global added in v1.9.17

func (rs *ReferenceScope) Global() BlockScope

func (*ReferenceScope) InlineTableExists added in v1.10.1

func (rs *ReferenceScope) InlineTableExists(name parser.Identifier) bool

func (*ReferenceScope) LoadFilePath added in v1.9.17

func (rs *ReferenceScope) LoadFilePath(identifier string) (string, bool)

func (*ReferenceScope) LoadInlineTable added in v1.9.17

func (rs *ReferenceScope) LoadInlineTable(ctx context.Context, clause parser.WithClause) error

func (*ReferenceScope) NextRecord added in v1.9.17

func (rs *ReferenceScope) NextRecord() bool

func (*ReferenceScope) Now added in v1.9.17

func (rs *ReferenceScope) Now() time.Time

func (*ReferenceScope) OpenCursor added in v1.9.17

func (rs *ReferenceScope) OpenCursor(ctx context.Context, name parser.Identifier, values []parser.ReplaceValue) error

func (*ReferenceScope) ReplaceTemporaryTable added in v1.9.17

func (rs *ReferenceScope) ReplaceTemporaryTable(view *View)

func (*ReferenceScope) RestoreTemporaryTable added in v1.9.17

func (rs *ReferenceScope) RestoreTemporaryTable(uncomittedViews map[string]*FileInfo) []string

func (*ReferenceScope) SetInlineTable added in v1.9.17

func (rs *ReferenceScope) SetInlineTable(ctx context.Context, inlineTable parser.InlineTable) error

func (*ReferenceScope) SetTemporaryTable added in v1.9.17

func (rs *ReferenceScope) SetTemporaryTable(view *View)

func (*ReferenceScope) StoreFilePath added in v1.9.17

func (rs *ReferenceScope) StoreFilePath(identifier string, fpath string)

func (*ReferenceScope) StoreInlineTable added in v1.13.0

func (rs *ReferenceScope) StoreInlineTable(name parser.Identifier, view *View) error

func (*ReferenceScope) StoreTemporaryTable added in v1.9.17

func (rs *ReferenceScope) StoreTemporaryTable(session *Session, uncomittedViews map[string]*FileInfo) []string

func (*ReferenceScope) SubstituteVariable added in v1.9.17

func (rs *ReferenceScope) SubstituteVariable(ctx context.Context, expr parser.VariableSubstitution) (val value.Primary, err error)

func (*ReferenceScope) SubstituteVariableDirectly added in v1.9.17

func (rs *ReferenceScope) SubstituteVariableDirectly(variable parser.Variable, val value.Primary) (value.Primary, error)

func (*ReferenceScope) TemporaryTableExists added in v1.9.17

func (rs *ReferenceScope) TemporaryTableExists(identifier string) bool

type RegExpMap added in v1.15.0

type RegExpMap struct {
	*SyncMap
}

func NewRegExpMap added in v1.15.0

func NewRegExpMap() RegExpMap

func (RegExpMap) Get added in v1.15.0

func (rem RegExpMap) Get(expr string) (*regexp.Regexp, error)

func (RegExpMap) Load added in v1.15.0

func (rem RegExpMap) Load(key string) (*regexp.Regexp, bool)

func (RegExpMap) Store added in v1.15.0

func (rem RegExpMap) Store(key string, value *regexp.Regexp)

type RemoveFlagNotSupportedNameError added in v1.6.5

type RemoveFlagNotSupportedNameError struct {
	*BaseError
}

type ReplaceKeyNotSetError added in v1.9.13

type ReplaceKeyNotSetError struct {
	*BaseError
}

type ReplaceValueLengthError added in v1.5.3

type ReplaceValueLengthError struct {
	*BaseError
}

type ReplaceValues added in v1.9.4

type ReplaceValues struct {
	Values []parser.QueryExpression
	Names  map[string]int
}

func NewReplaceValues added in v1.9.4

func NewReplaceValues(replace []parser.ReplaceValue) *ReplaceValues

type RollbackError added in v1.6.0

type RollbackError struct {
	*BaseError
}

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

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 SelectIntoQueryFieldLengthNotMatchError added in v1.9.14

type SelectIntoQueryFieldLengthNotMatchError struct {
	*BaseError
}

type SelectIntoQueryTooManyRecordsError added in v1.9.14

type SelectIntoQueryTooManyRecordsError struct {
	*BaseError
}

type Session added in v1.9.3

type Session struct {
	CanReadStdin    bool
	CanOutputToPipe bool
	// contains filtered or unexported fields
}

func NewSession added in v1.9.3

func NewSession() *Session

func (*Session) GetStdinView added in v1.9.10

func (sess *Session) GetStdinView(ctx context.Context, flags *option.Flags, fileInfo *FileInfo, expr parser.Stdin) (*View, error)

func (*Session) OutFile added in v1.9.3

func (sess *Session) OutFile() io.Writer

func (*Session) ScreenFd added in v1.9.3

func (sess *Session) ScreenFd() uintptr

func (*Session) ScreenWidth added in v1.17.8

func (sess *Session) ScreenWidth() int

func (*Session) SetOutFile added in v1.9.10

func (sess *Session) SetOutFile(w io.Writer)

func (*Session) SetStderr added in v1.9.10

func (sess *Session) SetStderr(w io.WriteCloser)

func (*Session) SetStdin added in v1.9.10

func (sess *Session) SetStdin(r io.ReadCloser) error

func (*Session) SetStdinContext added in v1.9.10

func (sess *Session) SetStdinContext(ctx context.Context, r io.ReadCloser) error

func (*Session) SetStdout added in v1.9.10

func (sess *Session) SetStdout(w io.WriteCloser)

func (*Session) SetTerminal added in v1.9.10

func (sess *Session) SetTerminal(t VirtualTerminal)

func (*Session) Stderr added in v1.9.3

func (sess *Session) Stderr() io.WriteCloser

func (*Session) Stdin added in v1.9.3

func (sess *Session) Stdin() io.ReadCloser

func (*Session) Stdout added in v1.9.3

func (sess *Session) Stdout() io.WriteCloser

func (*Session) Terminal added in v1.9.3

func (sess *Session) Terminal() VirtualTerminal

func (*Session) WriteToStderr added in v1.9.3

func (sess *Session) WriteToStderr(s string) (err error)

func (*Session) WriteToStderrWithLineBreak added in v1.9.3

func (sess *Session) WriteToStderrWithLineBreak(s string) error

func (*Session) WriteToStdout added in v1.9.3

func (sess *Session) WriteToStdout(s string) (err error)

func (*Session) WriteToStdoutWithLineBreak added in v1.9.3

func (sess *Session) WriteToStdoutWithLineBreak(s string) error

type ShowInvalidObjectTypeError added in v1.5.0

type ShowInvalidObjectTypeError struct {
	*BaseError
}

type SignalReceived added in v1.9.9

type SignalReceived struct {
	*BaseError
}

type SortValue added in v0.6.3

type SortValue struct {
	Type SortValueType

	SerializedKey *bytes.Buffer

	Integer  int64
	Float    float64
	Datetime int64
	String   string
}

func NewSortValue added in v0.6.3

func NewSortValue(val value.Primary, flags *option.Flags) *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(buf *bytes.Buffer)

type SourceInvalidFilePathError added in v1.5.3

type SourceInvalidFilePathError struct {
	*BaseError
}

type StatementFlow added in v0.1.8

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

type StatementNotExistError added in v1.9.4

type StatementNotExistError struct {
	*BaseError
}

type StatementReplaceValueNotSpecifiedError added in v1.9.4

type StatementReplaceValueNotSpecifiedError struct {
	*BaseError
}

type StdinEmptyError added in v0.4.3

type StdinEmptyError struct {
	*BaseError
}

type StdinLocker added in v1.9.10

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

func NewStdinLocker added in v1.9.10

func NewStdinLocker() *StdinLocker

func (*StdinLocker) Lock added in v1.9.10

func (cl *StdinLocker) Lock() error

func (*StdinLocker) LockContext added in v1.9.10

func (cl *StdinLocker) LockContext(ctx context.Context) error

func (*StdinLocker) RLock added in v1.9.10

func (cl *StdinLocker) RLock() error

func (*StdinLocker) RLockContext added in v1.9.10

func (cl *StdinLocker) RLockContext(ctx context.Context) error

func (*StdinLocker) RUnlock added in v1.9.10

func (cl *StdinLocker) RUnlock() (err error)

func (*StdinLocker) Unlock added in v1.9.10

func (cl *StdinLocker) Unlock() (err error)

type StringFormatter added in v1.5.3

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

func NewStringFormatter added in v1.5.3

func NewStringFormatter() *StringFormatter

func (*StringFormatter) Format added in v1.5.3

func (f *StringFormatter) Format(format string, values []value.Primary) (string, error)

type SubqueryTooManyFieldsError added in v0.4.3

type SubqueryTooManyFieldsError struct {
	*BaseError
}

type SubqueryTooManyRecordsError added in v0.4.3

type SubqueryTooManyRecordsError struct {
	*BaseError
}

type SyncMap added in v1.9.7

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

func NewSyncMap added in v1.9.7

func NewSyncMap() *SyncMap

func (SyncMap) Clear added in v1.9.15

func (m SyncMap) Clear()

func (SyncMap) Keys added in v1.9.7

func (m SyncMap) Keys() []string

func (SyncMap) Len added in v1.9.7

func (m SyncMap) Len() int

func (SyncMap) Range added in v1.9.7

func (m SyncMap) Range(fn func(key, value interface{}) bool)

func (SyncMap) SortedKeys added in v1.9.7

func (m SyncMap) SortedKeys() []string

type SyntaxError added in v0.4.3

type SyntaxError struct {
	*BaseError
}

type SystemError added in v1.9.3

type SystemError struct {
	*BaseError
}

type TableAttributeUnchangedError added in v1.6.2

type TableAttributeUnchangedError struct {
	Path    string
	Message string
}

func (TableAttributeUnchangedError) Error added in v1.6.2

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 TableObjectJsonArgumentsLengthError added in v1.5.0

type TableObjectJsonArgumentsLengthError 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 Transaction added in v1.9.3

type Transaction struct {
	Session *Session

	Environment *option.Environment
	Palette     *color.Palette
	Flags       *option.Flags

	WaitTimeout   time.Duration
	RetryDelay    time.Duration
	FileContainer *file.Container

	CachedViews      ViewMap
	UncommittedViews UncommittedViews

	UrlCache map[string]*UrlResource

	PreparedStatements PreparedStatementMap

	SelectedViews []*View
	AffectedRows  int

	AutoCommit bool
	// contains filtered or unexported fields
}

func NewTransaction added in v1.9.3

func NewTransaction(ctx context.Context, defaultWaitTimeout time.Duration, retryDelay time.Duration, session *Session) (*Transaction, error)

func (*Transaction) ClearUrlCache added in v1.17.8

func (tx *Transaction) ClearUrlCache()

func (*Transaction) Commit added in v1.9.3

func (tx *Transaction) Commit(ctx context.Context, scope *ReferenceScope, expr parser.Expression) error

func (*Transaction) CreateDocumentWriter added in v1.17.8

func (tx *Transaction) CreateDocumentWriter() *doc.Writer

func (*Transaction) Error added in v1.9.10

func (tx *Transaction) Error(s string) string

func (*Transaction) GetFlag added in v1.9.11

func (tx *Transaction) GetFlag(key string) (value.Primary, bool)

func (*Transaction) LockStdinContext added in v1.9.10

func (tx *Transaction) LockStdinContext(ctx context.Context) error

func (*Transaction) Log added in v1.9.10

func (tx *Transaction) Log(log string, quiet bool)

func (*Transaction) LogError added in v1.9.10

func (tx *Transaction) LogError(log string)

func (*Transaction) LogNotice added in v1.9.10

func (tx *Transaction) LogNotice(log string, quiet bool)

func (*Transaction) LogWarn added in v1.9.10

func (tx *Transaction) LogWarn(log string, quiet bool)

func (*Transaction) Notice added in v1.9.10

func (tx *Transaction) Notice(s string) string

func (*Transaction) RLockStdinContext added in v1.9.10

func (tx *Transaction) RLockStdinContext(ctx context.Context) error

func (*Transaction) RUnlockStdin added in v1.9.10

func (tx *Transaction) RUnlockStdin()

func (*Transaction) ReleaseResources added in v1.9.3

func (tx *Transaction) ReleaseResources() error

func (*Transaction) ReleaseResourcesWithErrors added in v1.9.3

func (tx *Transaction) ReleaseResourcesWithErrors() error

func (*Transaction) Rollback added in v1.9.3

func (tx *Transaction) Rollback(scope *ReferenceScope, expr parser.Expression) error

func (*Transaction) SetFlag added in v1.9.11

func (tx *Transaction) SetFlag(key string, value interface{}) error

func (*Transaction) SetFormatFlag added in v1.9.18

func (tx *Transaction) SetFormatFlag(value interface{}, outFile string) error

func (*Transaction) UnlockStdin added in v1.9.10

func (tx *Transaction) UnlockStdin()

func (*Transaction) UpdateWaitTimeout added in v1.9.3

func (tx *Transaction) UpdateWaitTimeout(waitTimeout float64, retryDelay time.Duration)

func (*Transaction) UseColor added in v1.9.10

func (tx *Transaction) UseColor(useColor bool)

func (*Transaction) Warn added in v1.9.10

func (tx *Transaction) Warn(s string) string

type UintPool added in v1.10.3

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

func NewUintPool added in v1.10.3

func NewUintPool(initCap int, limitToUseSlice int) *UintPool

func (*UintPool) Add added in v1.10.3

func (c *UintPool) Add(val uint)

func (*UintPool) Exists added in v1.10.3

func (c *UintPool) Exists(val uint) bool

func (*UintPool) Len added in v1.10.3

func (c *UintPool) Len() int

func (*UintPool) Range added in v1.10.3

func (c *UintPool) Range(fn func(idx int, value uint) error) error

type UncommittedViews added in v1.6.2

type UncommittedViews struct {
	Created map[string]*FileInfo
	Updated map[string]*FileInfo
	// contains filtered or unexported fields
}

func NewUncommittedViews added in v1.9.4

func NewUncommittedViews() UncommittedViews

func (*UncommittedViews) Clean added in v1.9.4

func (m *UncommittedViews) Clean()

func (*UncommittedViews) CountCreatedTables added in v1.9.4

func (m *UncommittedViews) CountCreatedTables() int

func (*UncommittedViews) CountUpdatedTables added in v1.9.4

func (m *UncommittedViews) CountUpdatedTables() int

func (*UncommittedViews) CountUpdatedViews added in v1.9.4

func (m *UncommittedViews) CountUpdatedViews() int

func (*UncommittedViews) IsEmpty added in v1.9.4

func (m *UncommittedViews) IsEmpty() bool

func (*UncommittedViews) SetForCreatedView added in v1.9.4

func (m *UncommittedViews) SetForCreatedView(fileInfo *FileInfo)

func (*UncommittedViews) SetForUpdatedView added in v1.9.4

func (m *UncommittedViews) SetForUpdatedView(fileInfo *FileInfo)

func (*UncommittedViews) UncommittedFiles added in v1.9.4

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

func (*UncommittedViews) UncommittedTempViews added in v1.9.4

func (m *UncommittedViews) UncommittedTempViews() map[string]*FileInfo

func (*UncommittedViews) Unset added in v1.9.4

func (m *UncommittedViews) Unset(fileInfo *FileInfo)

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 UndefinedConstantError added in v1.17.7

type UndefinedConstantError struct {
	*BaseError
}

type UndefinedInLineTableError added in v0.4.3

type UndefinedInLineTableError struct {
	*BaseError
}

type UnknownFormatPlaceholderError added in v1.5.3

type UnknownFormatPlaceholderError struct {
	*BaseError
}

type UnsupportedUrlSchemeError added in v1.17.8

type UnsupportedUrlSchemeError 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 UrlResource added in v1.17.8

type UrlResource struct {
	MimeType string
	Data     []byte
}

func NewUrlResource added in v1.17.8

func NewUrlResource(res *http.Response) (*UrlResource, error)

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(ctx context.Context, scope *ReferenceScope, args []value.Primary) (value.Primary, error)

func (*UserDefinedFunction) ExecuteAggregate added in v0.4.11

func (fn *UserDefinedFunction) ExecuteAggregate(ctx context.Context, scope *ReferenceScope, values []value.Primary, args []value.Primary) (value.Primary, error)

type UserDefinedFunctionMap added in v0.4.3

type UserDefinedFunctionMap struct {
	*SyncMap
}

func NewUserDefinedFunctionMap added in v1.9.19

func NewUserDefinedFunctionMap() UserDefinedFunctionMap

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) Delete added in v1.9.19

func (m UserDefinedFunctionMap) Delete(name string)

func (UserDefinedFunctionMap) Dispose added in v1.0.1

func (m UserDefinedFunctionMap) Dispose(name parser.Identifier) bool

func (UserDefinedFunctionMap) Exists added in v1.9.19

func (m UserDefinedFunctionMap) Exists(name string) bool

func (UserDefinedFunctionMap) Get added in v0.4.3

func (UserDefinedFunctionMap) IsEmpty added in v1.9.19

func (m UserDefinedFunctionMap) IsEmpty() bool

func (UserDefinedFunctionMap) Load added in v1.9.19

func (UserDefinedFunctionMap) LoadDirect added in v1.13.0

func (m UserDefinedFunctionMap) LoadDirect(name string) (interface{}, bool)

func (UserDefinedFunctionMap) Store added in v1.9.19

type UserTriggeredError added in v0.5.0

type UserTriggeredError struct {
	*BaseError
}

type VariableMap added in v0.7.9

type VariableMap struct {
	*SyncMap
}

func NewVariableMap added in v1.6.6

func NewVariableMap() VariableMap

func (VariableMap) Add added in v0.7.9

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

func (VariableMap) Declare added in v0.7.9

func (m VariableMap) Declare(ctx context.Context, scope *ReferenceScope, declaration parser.VariableDeclaration) error

func (VariableMap) Delete added in v1.9.7

func (m VariableMap) Delete(name string)

func (VariableMap) Dispose added in v0.7.9

func (m VariableMap) Dispose(variable parser.Variable) bool

func (VariableMap) Exists added in v1.9.7

func (m VariableMap) Exists(name string) bool

func (VariableMap) Get added in v0.7.9

func (m VariableMap) Get(variable parser.Variable) (value.Primary, bool)

func (VariableMap) IsEmpty added in v1.9.17

func (m VariableMap) IsEmpty() bool

func (VariableMap) Load added in v1.9.7

func (m VariableMap) Load(name string) (value.Primary, bool)

func (VariableMap) LoadDirect added in v1.13.0

func (m VariableMap) LoadDirect(name string) (interface{}, bool)

func (VariableMap) Set added in v0.7.9

func (m VariableMap) Set(variable parser.Variable, val value.Primary) bool

func (VariableMap) Store added in v1.9.7

func (m VariableMap) Store(name string, val value.Primary)

type VariableRedeclaredError added in v0.4.3

type VariableRedeclaredError struct {
	*BaseError
}

type View

type View struct {
	Header    Header
	RecordSet RecordSet
	FileInfo  *FileInfo
	// contains filtered or unexported fields
}

func LoadView added in v1.10.3

func LoadView(ctx context.Context, scope *ReferenceScope, tables []parser.QueryExpression, forUpdate bool, useInternalId bool) (*View, error)

func LoadViewFromTableIdentifier added in v1.10.3

func LoadViewFromTableIdentifier(ctx context.Context, scope *ReferenceScope, table parser.QueryExpression, forUpdate bool, useInternalId bool) (*View, error)

func NewDualView

func NewDualView() *View

func NewView

func NewView() *View

func NewViewFromGroupedRecord

func NewViewFromGroupedRecord(ctx context.Context, flags *option.Flags, referenceRecord ReferenceRecord) (*View, error)

func Select added in v0.1.6

func Select(ctx context.Context, scope *ReferenceScope, query parser.SelectQuery) (*View, error)

func (*View) Copy added in v0.1.6

func (view *View) Copy() *View

func (*View) CreateRestorePoint added in v1.9.10

func (view *View) CreateRestorePoint()

func (*View) Except added in v0.2.1

func (view *View) Except(ctx context.Context, flags *option.Flags, calcView *View, all bool) (err error)

func (*View) ExtendRecordCapacity added in v0.6.8

func (view *View) ExtendRecordCapacity(ctx context.Context, scope *ReferenceScope, exprs []parser.QueryExpression, funcs []parser.AnalyticFunction) 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(ctx context.Context, flags *option.Flags) error

func (*View) GenerateComparisonKeys added in v0.6.6

func (view *View) GenerateComparisonKeys(ctx context.Context, flags *option.Flags) error

func (*View) GroupBy

func (view *View) GroupBy(ctx context.Context, scope *ReferenceScope, clause parser.GroupByClause) error

func (*View) Having

func (view *View) Having(ctx context.Context, scope *ReferenceScope, clause parser.HavingClause) error

func (*View) InsertFromQuery added in v0.1.6

func (view *View) InsertFromQuery(ctx context.Context, scope *ReferenceScope, fields []parser.QueryExpression, query parser.SelectQuery) (int, error)

func (*View) InsertValues added in v0.1.6

func (view *View) InsertValues(ctx context.Context, scope *ReferenceScope, fields []parser.QueryExpression, list []parser.QueryExpression) (int, 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(ctx context.Context, flags *option.Flags, calcView *View, all bool) (err error)

func (*View) IsUpdatable added in v1.17.8

func (view *View) IsUpdatable() 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(ctx context.Context, scope *ReferenceScope, clause parser.LimitClause) error

func (*View) ListValuesForAggregateFunctions added in v0.4.9

func (view *View) ListValuesForAggregateFunctions(ctx context.Context, scope *ReferenceScope, expr parser.QueryExpression, arg parser.QueryExpression, distinct bool) ([]value.Primary, error)

func (*View) Offset added in v0.2.2

func (view *View) Offset(ctx context.Context, scope *ReferenceScope, clause parser.OffsetClause) error

func (*View) OrderBy

func (view *View) OrderBy(ctx context.Context, scope *ReferenceScope, clause parser.OrderByClause) error

func (*View) RecordLen

func (view *View) RecordLen() int

func (*View) ReplaceFromQuery added in v1.9.13

func (view *View) ReplaceFromQuery(ctx context.Context, scope *ReferenceScope, fields []parser.QueryExpression, query parser.SelectQuery, keys []parser.QueryExpression) (int, error)

func (*View) ReplaceValues added in v1.9.13

func (view *View) ReplaceValues(ctx context.Context, scope *ReferenceScope, fields []parser.QueryExpression, list []parser.QueryExpression, keys []parser.QueryExpression) (int, error)

func (*View) Restore added in v1.9.10

func (view *View) Restore()

func (*View) RestoreHeaderReferences added in v0.4.10

func (view *View) RestoreHeaderReferences() error

func (*View) Select

func (view *View) Select(ctx context.Context, scope *ReferenceScope, clause parser.SelectClause) error

func (*View) SelectAllColumns added in v0.1.6

func (view *View) SelectAllColumns(ctx context.Context, scope *ReferenceScope) error

func (*View) Swap

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

func (*View) Union added in v0.2.1

func (view *View) Union(ctx context.Context, flags *option.Flags, calcView *View, all bool) (err error)

func (*View) Where

func (view *View) Where(ctx context.Context, scope *ReferenceScope, clause parser.WhereClause) error

type ViewMap added in v0.1.6

type ViewMap struct {
	*SyncMap
}

func NewViewMap added in v0.1.6

func NewViewMap() ViewMap

func (ViewMap) Clean added in v0.7.10

func (m ViewMap) Clean(container *file.Container) error

func (ViewMap) CleanWithErrors added in v1.6.0

func (m ViewMap) CleanWithErrors(container *file.Container) error

func (ViewMap) Delete added in v1.9.7

func (m ViewMap) Delete(identifier string)

func (ViewMap) Dispose added in v0.7.10

func (m ViewMap) Dispose(container *file.Container, identifier string) error

func (ViewMap) DisposeTemporaryTable added in v0.4.1

func (m ViewMap) DisposeTemporaryTable(tablePath parser.QueryExpression) bool

func (ViewMap) Exists added in v0.1.6

func (m ViewMap) Exists(identifier string) bool

func (ViewMap) Get added in v0.1.6

func (m ViewMap) Get(identifier string) (*View, error)

func (ViewMap) GetWithInternalId added in v0.1.6

func (m ViewMap) GetWithInternalId(ctx context.Context, identifier string, flags *option.Flags) (*View, error)

func (ViewMap) IsEmpty added in v1.9.17

func (m ViewMap) IsEmpty() bool

func (ViewMap) Load added in v1.9.7

func (m ViewMap) Load(identifier string) (*View, bool)

func (ViewMap) LoadDirect added in v1.13.0

func (m ViewMap) LoadDirect(identifier string) (interface{}, bool)

func (ViewMap) Set added in v0.1.6

func (m ViewMap) Set(view *View)

func (ViewMap) Store added in v1.9.7

func (m ViewMap) Store(identifier string, view *View)

type ViewType added in v1.9.10

type ViewType int
const (
	ViewTypeFile ViewType = iota
	ViewTypeTemporaryTable
	ViewTypeStdin
	ViewTypeRemoteObject
	ViewTypeStringObject
	ViewTypeInlineTable
)

type VirtualTerminal added in v1.6.2

type VirtualTerminal interface {
	ReadLine() (string, error)
	Write(string) error
	WriteError(string) error
	SetPrompt(ctx context.Context)
	SetContinuousPrompt(ctx context.Context)
	SaveHistory(string) error
	Teardown() error
	GetSize() (int, int, error)
	ReloadConfig() error
	UpdateCompleter()
}

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

Jump to

Keyboard shortcuts

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