parser

package
v0.0.0-...-41f8e05 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategorizePointer

func CategorizePointer(ptr Value) (int, error)

func GetComparisonFunction

func GetComparisonFunction(operator int, dataType int) Command

Function to get the correct comparison function

func HandleNot

func HandleNot(e *EvaluationContext, typeToken int) (int, error)

func NewColumn

func NewColumn(name string, coltype int, length int, spec2 int) GoSqlColumn

Types

type AggTermsBySelectListEntry

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

type AttrSLE

type AttrSLE struct {
	BaseSLE
	// contains filtered or unexported fields
}

type BaseSLE

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

type CalculatedSLE

type CalculatedSLE struct {
	BaseSLE
	// contains filtered or unexported fields
}

type ConstSLE

type ConstSLE struct {
	BaseSLE
	// contains filtered or unexported fields
}

type EvaluationContext

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

the data necessary to convert a TermTree into a machine to calculate the result of the term

func NewEvaluationContext

func NewEvaluationContext(args []Value, lastPlaceHolderIndex int) EvaluationContext

func OrderBy2Commands

func OrderBy2Commands(orderByList *[]GoSqlOrderBy, table Table) (*EvaluationContext, error)

func Terms2Commands

func Terms2Commands(terms []*GoSqlTerm, args []driver.Value, inputTable *JoinedRecords, placeHolderOffset *int) ([]*EvaluationContext, error)

type FromExpr

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

describes one chain of joins

type FromHandler

type FromHandler interface {
	Init(*data.BaseStatement, []*GoSqlFromSpec)
	GetValue(data.GoSqlIdentifier) driver.Value
	// contains filtered or unexported methods
}

initialized by From-Expression starts delivering Joined View of Record which is base of select-statement allows conversion of GoSqlIdentifier to index so that machine can access attributes by index Next-Operation iterates through valid

type FromPart

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

type GoSqlConnectionLevelRequest

type GoSqlConnectionLevelRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func NewConnectionLevelRequest

func NewConnectionLevelRequest(token1 int, token2 int) *GoSqlConnectionLevelRequest

func (*GoSqlConnectionLevelRequest) Exec

func (r *GoSqlConnectionLevelRequest) Exec(args []Value) (Result, error)

func (*GoSqlConnectionLevelRequest) NumInput

func (r *GoSqlConnectionLevelRequest) NumInput() int

type GoSqlConstantValue

type GoSqlConstantValue struct {
	Str       *string
	Fixed     *int
	Float     *float64
	Timestamp *time.Time
}

type GoSqlCreateDatabaseRequest

type GoSqlCreateDatabaseRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func (*GoSqlCreateDatabaseRequest) Exec

func (r *GoSqlCreateDatabaseRequest) Exec(args []Value) (Result, error)

type GoSqlCreateSchemaRequest

type GoSqlCreateSchemaRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func (*GoSqlCreateSchemaRequest) Exec

func (r *GoSqlCreateSchemaRequest) Exec(args []Value) (Result, error)

type GoSqlCreateTableRequest

type GoSqlCreateTableRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func (*GoSqlCreateTableRequest) Exec

func (r *GoSqlCreateTableRequest) Exec(args []Value) (Result, error)

type GoSqlDeleteRequest

type GoSqlDeleteRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func (*GoSqlDeleteRequest) Exec

func (r *GoSqlDeleteRequest) Exec(args []Value) (Result, error)

func (*GoSqlDeleteRequest) NumInput

func (r *GoSqlDeleteRequest) NumInput() int

type GoSqlFromHandler

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

func (*GoSqlFromHandler) Init

func (g *GoSqlFromHandler) Init(selectStatement *GoSqlSelectRequest) []error

type GoSqlInsertRequest

type GoSqlInsertRequest struct {
	data.BaseStatement

	Columns []string
	// contains filtered or unexported fields
}

func NewInsertRequest

func NewInsertRequest(tableName GoSqlIdentifier, columns []string, values [][]*GoSqlTerm) *GoSqlInsertRequest

func (*GoSqlInsertRequest) Exec

func (r *GoSqlInsertRequest) Exec(args []Value) (Result, error)

func (*GoSqlInsertRequest) NumInput

func (r *GoSqlInsertRequest) NumInput() int

type GoSqlJoinedTable

type GoSqlJoinedTable struct {
	JoinedTableLeft     *GoSqlJoinedTable
	JoinType            int
	TableReferenceRight *GoSqlTableReference
	// contains filtered or unexported fields
}

type GoSqlOrderBy

type GoSqlOrderBy struct {
	Name driver.Value
	// contains filtered or unexported fields
}

type GoSqlResult

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

func (GoSqlResult) LastInsertId

func (r GoSqlResult) LastInsertId() (int64, error)

func (GoSqlResult) RowsAffected

func (r GoSqlResult) RowsAffected() (int64, error)

type GoSqlRows

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

func (*GoSqlRows) Close

func (rows *GoSqlRows) Close() error

func (*GoSqlRows) Columns

func (rows *GoSqlRows) Columns() []string

func (*GoSqlRows) Next

func (rows *GoSqlRows) Next(dest []Value) error

func (*GoSqlRows) ResultTable

func (rows *GoSqlRows) ResultTable() data.Table

type GoSqlSelectRequest

type GoSqlSelectRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func (*GoSqlSelectRequest) Exec

func (r *GoSqlSelectRequest) Exec(args []Value) (Result, error)

func (*GoSqlSelectRequest) NumInput

func (r *GoSqlSelectRequest) NumInput() int

func (*GoSqlSelectRequest) Query

func (r *GoSqlSelectRequest) Query(args []Value) (Rows, error)

type GoSqlStatement

type GoSqlStatement interface {
	NumInput() int
	Exec(args []Value) (Result, error)
	Query(args []Value) (Rows, error)
}

type GoSqlTableReference

type GoSqlTableReference struct {
	Id          data.GoSqlIdentifier
	Select      *GoSqlSelectRequest
	JoinedTable *GoSqlJoinedTable
	As          string
}

type GoSqlTerm

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

represents parts of expressions if left is != nil: leaf is nil, operator is >= 0 if right is nil, operator is unary (NOT) if leaf is != nil then operator is -1 and left and right are nil

func FindPlaceHoldersInSelect

func FindPlaceHoldersInSelect(statement *GoSqlSelectRequest) []*GoSqlTerm

func (*GoSqlTerm) FindPlaceHolders

func (t *GoSqlTerm) FindPlaceHolders(res []*GoSqlTerm) []*GoSqlTerm

type GoSqlUpdateRequest

type GoSqlUpdateRequest struct {
	data.BaseStatement
	// contains filtered or unexported fields
}

func NewUpdateRequest

func NewUpdateRequest(tableName GoSqlAsIdentifier, updates []GoSqlUpdateSpec, where *GoSqlTerm) *GoSqlUpdateRequest

func (*GoSqlUpdateRequest) Exec

func (r *GoSqlUpdateRequest) Exec(args []Value) (Result, error)

func (*GoSqlUpdateRequest) NumInput

func (r *GoSqlUpdateRequest) NumInput() int

type GoSqlUpdateSpec

type GoSqlUpdateSpec struct {
	Name data.GoSqlIdentifier
	// contains filtered or unexported fields
}

type IdentifierMapEntry

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

type JoinedRecord

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

func (*JoinedRecord) Clone

func (j *JoinedRecord) Clone() data.Tuple

func (*JoinedRecord) Data

func (j *JoinedRecord) Data(tableIx int, ix int) (driver.Value, error)

func (*JoinedRecord) DataLen

func (j *JoinedRecord) DataLen() int

func (*JoinedRecord) Id

func (j *JoinedRecord) Id() int64

func (*JoinedRecord) SafeData

func (j *JoinedRecord) SafeData(tableIx int, ix int) driver.Value

func (*JoinedRecord) SetData

func (j *JoinedRecord) SetData(tableIx int, ix int, v driver.Value) error

type JoinedRecordTable

type JoinedRecordTable struct {
}

type JoinedRecords

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

func JoinedRecordsFromTable

func JoinedRecordsFromTable(table data.Table) *JoinedRecords

type JoinedRecordsIterator

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

func (*JoinedRecordsIterator) GetTable

func (j *JoinedRecordsIterator) GetTable() data.Table

func (*JoinedRecordsIterator) Next

func (j *JoinedRecordsIterator) Next(f func(tuple data.Tuple) (bool, error)) (data.Tuple, bool, error)

type NodeKind

type NodeKind int
const (
	AggregationNode NodeKind = iota + 1
	ConstantNode
	GroupByNode
	HavingNode
	SelectListNode
	ParameterNode
)

type OriginalInfo

type OriginalInfo struct {
	Kind  NodeKind
	Index int
	// contains filtered or unexported fields
}

type PartNode

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

type Ptr

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

type SLE

type SLE interface {
}

type SLName

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

type SelectListEntry

type SelectListEntry struct {
	Asterisk bool

	Alias string
	// contains filtered or unexported fields
}

func NewSelectListEntry

func NewSelectListEntry(asterisk bool, expression *GoSqlTerm, alias string) SelectListEntry

type SimpleAggSLE

type SimpleAggSLE struct {
	BaseSLE
	// contains filtered or unexported fields
}

type TableExpr

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

describes a table expression in the From-Part including the preceding jointype, if there is one

type TableViewData

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

represents the view on the table used for joining, isOuter defines, that table should be outer-joined values represents the view records where the first Value in the records represents the internal record-Id (as int64) if there is one. The view should be sorted according less_than

Jump to

Keyboard shortcuts

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