Documentation
¶
Index ¶
- func AllNullable(fs ...func() bool) func() bool
- func AnyNullable(fs ...func() bool) func() bool
- func ExpandQuotedSource(buf *strings.Builder, source QuerySource)
- func NeverNullable(...func() bool) func() bool
- func NotNullable() bool
- func Nullable() bool
- type Function
- type Functions
- type Node
- type NodeInfo
- type NodeKey
- type NodeType
- type NodeTypes
- type QuerySource
- type QuerySources
- type ReturnColumn
- type StmtInfo
- type Visitor
- func (v Visitor[C, I]) GetArgs(start, stop int, translate func(string) (string, []string), ...) []drivers.QueryArg
- func (v Visitor[C, I]) GetName(expr Node) string
- func (w *Visitor[C, I]) MatchNames(p1, p2 NodeKey)
- func (v *Visitor[C, I]) MatchNodeNames(p1, p2 Node)
- func (v *Visitor[C, I]) MaybeSetName(key NodeKey, name string)
- func (v *Visitor[C, I]) MaybeSetNodeName(ctx Node, name string)
- func (v *Visitor[C, I]) SetArg(expr Node)
- func (v *Visitor[C, I]) SetGroup(expr Node)
- func (v *Visitor[C, I]) UpdateInfo(info NodeInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllNullable ¶
func AnyNullable ¶
func ExpandQuotedSource ¶
func ExpandQuotedSource(buf *strings.Builder, source QuerySource)
func NeverNullable ¶
func NotNullable ¶
func NotNullable() bool
Types ¶
type Function ¶
type Function struct {
RequiredArgs int
Variadic bool
Args []string
ReturnType string
CalcReturnType func(...string) string // If present, will be used to calculate the return type
ShouldArgsBeNullable bool
CalcNullable func(...func() bool) func() bool // will be provided with the nullability of the args
}
func GetFunctionType ¶
type Node ¶
type Node interface {
GetStart() antlr.Token
GetStop() antlr.Token
GetText() string
GetParser() antlr.Parser
}
type NodeTypes ¶
type NodeTypes []NodeType
func (NodeTypes) ConfirmedDBType ¶
type QuerySource ¶
type QuerySource struct {
Schema string
Name string
Columns []ReturnColumn
CTE bool
}
type QuerySources ¶
type QuerySources = []QuerySource
type Visitor ¶
type Visitor[C, I any] struct { Err error DB drivers.Tables[C, I] Args []NodeKey Groups []NodeKey Names map[NodeKey]string Infos map[NodeKey]NodeInfo Sources []QuerySource Functions Functions BaseRules []internal.EditRule // Refresh these for each statement StmtRules []internal.EditRule Atom *atomic.Int64 }
func (*Visitor[C, I]) MatchNames ¶
func (*Visitor[C, I]) MatchNodeNames ¶
func (*Visitor[C, I]) MaybeSetName ¶
func (*Visitor[C, I]) MaybeSetNodeName ¶
func (*Visitor[C, I]) UpdateInfo ¶
Click to show internal directories.
Click to hide internal directories.