sqlparser

package
v0.11.124 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnLineage

type ColumnLineage struct {
	Name     string           `json:"name"`
	Upstream []UpstreamColumn `json:"upstream"`
	Type     string           `json:"type"`
}

type Lineage

type Lineage struct {
	Columns            []ColumnLineage `json:"columns"`
	NonSelectedColumns []ColumnLineage `json:"non_selected_columns"`
}

type QueryConfig

type QueryConfig struct {
	Name   string `json:"name"`
	Query  string `json:"query"`
	Schema Schema `json:"schema"`
}

type SQLParser

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

func NewSQLParser

func NewSQLParser(randomize bool) (*SQLParser, error)

func (*SQLParser) Close

func (s *SQLParser) Close() error

func (*SQLParser) ColumnLineage

func (s *SQLParser) ColumnLineage(sql, dialect string, schema Schema) (*Lineage, error)

func (*SQLParser) Start

func (s *SQLParser) Start() error

func (*SQLParser) UsedTables added in v0.11.4

func (s *SQLParser) UsedTables(sql, dialect string) ([]string, error)

type Schema

type Schema map[string]map[string]string

type UpstreamColumn

type UpstreamColumn struct {
	Column string `json:"column"`
	Table  string `json:"table"`
}

Jump to

Keyboard shortcuts

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