preprocesssql

package
v1.0.83 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADInSet

func ADInSet(AChar byte, ASet TADCharSet) bool

ADInSet verifica se um caractere está presente em um conjunto de caracteres

func AnsiCompareText

func AnsiCompareText(str1, str2 string) int

func AnsiQuotedStr

func AnsiQuotedStr(S string, Quote byte) string

func Copy

func Copy(value string, col_ini, qtde_caracteres int) string

func Exclude

func Exclude[T comparable](slice []T, value T) []T

func In

func In[T any](valor T, lista []T) bool

func InIn

func InIn[T any](lista1 []T, lista2 []T) bool

func Include

func Include[T comparable](slice []T, value T) []T

Include adds a given value to a slice, if it doesn't already exist.

func IntToStr

func IntToStr(num int) string

func IsQuotedBase

func IsQuotedBase(value string, ACh1, ACh2 byte) bool

func Move

func Move(source []byte, dest []byte, count int)

func PreprocessSQL

func PreprocessSQL(commandtext string, ACreateParams, ACreateMacros, AExpandMacros, AExpandEscape, AParseSQL bool) (*TParams, *TMacros, *TMacros, error)

PreprocessSQL:

PreprocessSQL(commandtext string)(Params, MacrosUpd, MacrosRead,Errors)

func QuotedStr

func QuotedStr(s string) string

func UnQuoteBase

func UnQuoteBase(value string, ACh1, ACh2 byte) string

Types

type FDException

type FDException struct {
	Msg string
}

func NewFDException

func NewFDException(msg string) FDException

func (FDException) Error

func (e FDException) Error() string

type IFDPhysCommand

type IFDPhysCommand interface {
}

type NameQuoteSides

type NameQuoteSides []TNameQuoteSide

type TADCharSet

type TADCharSet map[byte]bool

type TCommandKind

type TCommandKind int

type TConnectionMetadata

type TConnectionMetadata struct {
}

func NewConnectionMetadata

func NewConnectionMetadata() *TConnectionMetadata

func (*TConnectionMetadata) AddEscapeSequenceArgs

func (cm *TConnectionMetadata) AddEscapeSequenceArgs(ASeq *TEscapeData) string

func (*TConnectionMetadata) EncodeObjName

func (cm *TConnectionMetadata) EncodeObjName(AParsedName TParsedName, ACommand IFDPhysCommand, AOpts TEncodeOptions) string

func (*TConnectionMetadata) EscapeFuncToID

func (cm *TConnectionMetadata) EscapeFuncToID(ASeq *TEscapeData) error

func (*TConnectionMetadata) GetNameParts

func (cm *TConnectionMetadata) GetNameParts() TNameParts

func (*TConnectionMetadata) GetNameQuoteChar

func (cm *TConnectionMetadata) GetNameQuoteChar(AQuote TNameQuoteLevel, ASide TNameQuoteSide) byte

func (*TConnectionMetadata) InternalEscapeBoolean

func (cm *TConnectionMetadata) InternalEscapeBoolean(AStr string) string

func (*TConnectionMetadata) InternalEscapeDate

func (cm *TConnectionMetadata) InternalEscapeDate(AStr string) string

func (*TConnectionMetadata) InternalEscapeDateTime

func (cm *TConnectionMetadata) InternalEscapeDateTime(AStr string) string

func (*TConnectionMetadata) InternalEscapeEscape

func (cm *TConnectionMetadata) InternalEscapeEscape(AEscape byte, AStr string) string

func (*TConnectionMetadata) InternalEscapeFloat

func (cm *TConnectionMetadata) InternalEscapeFloat(AStr string) string

func (*TConnectionMetadata) InternalEscapeFunction

func (cm *TConnectionMetadata) InternalEscapeFunction(ASeq *TEscapeData) string

func (*TConnectionMetadata) InternalEscapeInto

func (cm *TConnectionMetadata) InternalEscapeInto(AStr string) string

func (*TConnectionMetadata) InternalEscapeString

func (cm *TConnectionMetadata) InternalEscapeString(AStr string) string

func (*TConnectionMetadata) InternalEscapeTime

func (cm *TConnectionMetadata) InternalEscapeTime(AStr string) string

func (*TConnectionMetadata) TranslateEscapeSequence

func (cm *TConnectionMetadata) TranslateEscapeSequence(seq *TEscapeData) (string, error)

type TDBMSKind

type TDBMSKind int

type TDBMSKinds

type TDBMSKinds []TDBMSKind

type TEncodeOption

type TEncodeOption int

type TEncodeOptions

type TEncodeOptions []TEncodeOption

type TEscapeData

type TEscapeData struct {
	Kind TEscapeKind
	Args TStrings
	Name string
	Func TEscapeFunction
}

func NewEscapedData

func NewEscapedData() *TEscapeData

type TEscapeFunction

type TEscapeFunction int

type TEscapeKind

type TEscapeKind int

type TListByte

type TListByte []byte

func (*TListByte) Clear

func (lb *TListByte) Clear()

type TMacro

type TMacro struct {
	Value any
	Name  string
	SQL   string
}

func NewMacro

func NewMacro() *TMacro

type TMacros

type TMacros struct {
	Items []*TMacro
}

func NewMacros

func NewMacros() *TMacros

func (*TMacros) Add

func (ms *TMacros) Add(value *TMacro)

func (*TMacros) Clear

func (ms *TMacros) Clear()

func (*TMacros) Count

func (ms *TMacros) Count() int

func (*TMacros) FindMacro

func (ms *TMacros) FindMacro(name string) *TMacro

func (*TMacros) NewMacro

func (ms *TMacros) NewMacro() *TMacro

type TNamePart

type TNamePart int

type TNameParts

type TNameParts []TNamePart

type TNameQuoteLevel

type TNameQuoteLevel int

type TNameQuoteLevels

type TNameQuoteLevels []TNameQuoteLevel

func NewTNameQuoteLevels

func NewTNameQuoteLevels() TNameQuoteLevels

type TNameQuoteSide

type TNameQuoteSide int

type TParam

type TParam struct {
	Index           int
	Name            string
	Position        int
	IsCaseSensitive bool
	ParamType       TParamType
}

func NewParam

func NewParam() *TParam

type TParamBindMode

type TParamBindMode int

type TParamMark

type TParamMark int

type TParamType

type TParamType int

type TParamTypes

type TParamTypes []TParamType

type TParams

type TParams struct {
	Items    []*TParam
	BindMode TParamBindMode
	Markers  TStrings
}

func NewParams

func NewParams() *TParams

func (*TParams) Add

func (ps *TParams) Add(value *TParam)

func (*TParams) Clear

func (ps *TParams) Clear()

func (*TParams) Count

func (ps *TParams) Count() int

func (*TParams) FindParam

func (ps *TParams) FindParam(name string) *TParam

func (*TParams) IndexOf

func (ps *TParams) IndexOf(name string) int

func (*TParams) NewParam

func (ps *TParams) NewParam() *TParam

type TParsedName

type TParsedName struct {
	FCatalog    string
	FSchema     string
	FBaseObject string
	FObject     string
	FLink       string
	FOverload   string
}

type TPhysPreprocessor

type TPhysPreprocessor struct {
	Source      string
	Destination string
	Kind        TDBMSKind
	//-----------------------------
	Params       *TParams
	MacrosUpd    *TMacros
	MacrosRead   *TMacros
	Markers      TStrings
	Instrs       TPreprocessorInstrs
	ConnMetadata *TConnectionMetadata
	Nested       bool
	// contains filtered or unexported fields
}

func NewPhysPreprocessor

func NewPhysPreprocessor() *TPhysPreprocessor

func (*TPhysPreprocessor) Commit

func (pp *TPhysPreprocessor) Commit(ASkip int)

func (*TPhysPreprocessor) Execute

func (pp *TPhysPreprocessor) Execute() error

func (*TPhysPreprocessor) GetChar

func (pp *TPhysPreprocessor) GetChar() byte

func (*TPhysPreprocessor) Missed

func (pp *TPhysPreprocessor) Missed(AStr string) error

func (*TPhysPreprocessor) PopWriter

func (pp *TPhysPreprocessor) PopWriter() string

func (*TPhysPreprocessor) ProcessCommand

func (pp *TPhysPreprocessor) ProcessCommand() (string, error)

func (*TPhysPreprocessor) ProcessEscape

func (pp *TPhysPreprocessor) ProcessEscape() (TEscapeKind, error)

func (*TPhysPreprocessor) ProcessIdentifier

func (pp *TPhysPreprocessor) ProcessIdentifier(ADotAllowed bool, AIsQuoted *bool) (string, error)

func (*TPhysPreprocessor) ProcessMacro

func (pp *TPhysPreprocessor) ProcessMacro(AFirstCh byte) error

func (*TPhysPreprocessor) ProcessParam

func (pp *TPhysPreprocessor) ProcessParam() error

func (*TPhysPreprocessor) ProcessQuestion

func (pp *TPhysPreprocessor) ProcessQuestion()

func (*TPhysPreprocessor) ProcessQuoteTag

func (pp *TPhysPreprocessor) ProcessQuoteTag()

func (*TPhysPreprocessor) PushWriter

func (pp *TPhysPreprocessor) PushWriter()

func (*TPhysPreprocessor) PutBack

func (pp *TPhysPreprocessor) PutBack()

func (*TPhysPreprocessor) SkipWS

func (pp *TPhysPreprocessor) SkipWS()

func (*TPhysPreprocessor) TranslateEscape

func (pp *TPhysPreprocessor) TranslateEscape(aEscape *TEscapeData) (string, error)

func (*TPhysPreprocessor) UnCommit

func (pp *TPhysPreprocessor) UnCommit(AChars int)

func (*TPhysPreprocessor) WriteStr

func (pp *TPhysPreprocessor) WriteStr(AStr string)

type TPreprocessorInstr

type TPreprocessorInstr int

type TPreprocessorInstrs

type TPreprocessorInstrs []TPreprocessorInstr

func (*TPreprocessorInstrs) Add

func (*TPreprocessorInstrs) Clear

func (L *TPreprocessorInstrs) Clear()

func (*TPreprocessorInstrs) Remove

func (L *TPreprocessorInstrs) Remove(value TPreprocessorInstr)

func (*TPreprocessorInstrs) Removes

func (L *TPreprocessorInstrs) Removes(value TPreprocessorInstrs)

type TStrings

type TStrings []string

func (*TStrings) Add

func (L *TStrings) Add(value string)

func (*TStrings) AddStrings

func (L *TStrings) AddStrings(value TStrings)

func (*TStrings) Clear

func (L *TStrings) Clear()

type TTextEndOfLine

type TTextEndOfLine int

type TTextEndOfLines

type TTextEndOfLines []TTextEndOfLine

Jump to

Keyboard shortcuts

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