bqparser

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromClauseHasJoinWithoutOn

func FromClauseHasJoinWithoutOn(fromClause *Node, src string) bool

FromClauseHasJoinWithoutOn reports whether fromClause contains a JOIN keyword not matched by an ON condition, by scanning tokens at depth 0.

func LastPipeOperatorEnd added in v0.8.1

func LastPipeOperatorEnd(src string) (uint, bool)

LastPipeOperatorEnd returns the end offset of the last pipe operator "|>" in src that belongs to the query open at the end of src, that is, the pipe operator is in the same statement and at the same parenthesis depth.

Types

type Node

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

Node represents an AST node for BigQuery SQL.

func Parse

func Parse(sql string) *Node

Parse parses a BigQuery SQL string and returns the root "program" node.

func (*Node) ChildCount

func (n *Node) ChildCount() uint

func (*Node) EndByte

func (n *Node) EndByte() uint

func (*Node) FieldNameForChild

func (n *Node) FieldNameForChild(_ uint32) string

func (*Node) Kind

func (n *Node) Kind() string

func (*Node) NamedChild

func (n *Node) NamedChild(i uint) *Node

func (*Node) NamedChildCount

func (n *Node) NamedChildCount() uint

func (*Node) StartByte

func (n *Node) StartByte() uint

Jump to

Keyboard shortcuts

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