parser

package
v0.0.0-...-d4ea93b Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCreateColumns

func GetCreateColumns(sqlCommand string) ([]string, error)

func GetInsertColumns

func GetInsertColumns(sqlCommand string) ([]string, error)

func GetSelectColumns

func GetSelectColumns(sqlCommand string) ([]string, error)

func GetUpdateColumns

func GetUpdateColumns(sqlCommand string) ([]string, error)

Types

type CreateCols

type CreateCols struct {
	Col struct {
		Name string `json:"colname"`
	} `json:"ColumnDef"`
}

type CreateStatement

type CreateStatement struct {
	RawStmt struct {
		Stmt struct {
			CreateStmt struct {
				TableElts []CreateCols `json:"tableElts"`
			} `json:"CreateStmt"`
		} `json:"stmt"`
	} `json:"RawStmt"`
}

type Fields

type Fields struct {
	Col struct {
		Name string `json:"str"`
	} `json:"String"`
}

type InsertCols

type InsertCols struct {
	Col struct {
		Name     string `json:"name"`
		Location int    `json:"location"`
	} `json:"ResTarget"`
}

type InsertStatement

type InsertStatement struct {
	RawStmt struct {
		Stmt struct {
			InsertStmt struct {
				Cols []InsertCols `json:"cols"`
			} `json:"InsertStmt"`
		} `json:"stmt"`
	} `json:"RawStmt"`
}

type ResTarget

type ResTarget struct {
	ResTarget struct {
		Val struct {
			ColumnRef struct {
				Fields []Fields `fields`
			} `json:"ColumnRef"`
		} `json:"val"`
	} `json:"ResTarget"`
}

type SelectStatement

type SelectStatement struct {
	RawStmt struct {
		Stmt struct {
			SelectStmt struct {
				TargetList []ResTarget `json:"targetList"`
			} `json:"SelectStmt"`
		} `json:"stmt"`
	} `json:"RawStmt"`
}

type UpdateCols

type UpdateCols struct {
	Col struct {
		Name string `json:"name"`
	} `json:"ResTarget"`
}

type UpdateColsStatement

type UpdateColsStatement struct {
	RawStmt struct {
		Stmt struct {
			UpdateStmt struct {
				Cols []UpdateCols `json:"targetList"`
			} `json:"UpdateStmt"`
		} `json:"stmt"`
	} `json:"RawStmt"`
}

Jump to

Keyboard shortcuts

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