dinosql

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasStarRef

func HasStarRef(cf nodes.ColumnRef) bool

func ParseCatalog

func ParseCatalog(schemas []string) (core.Catalog, error)

Types

type Parameter

type Parameter struct {
	Number int
	Column core.Column
}

type ParserOpts added in v1.0.0

type ParserOpts struct {
	UsePositionalParameters bool
}

type Query

type Query struct {
	SQL      string
	Columns  []core.Column
	Params   []Parameter
	Name     string
	Cmd      string // TODO: Pick a better name. One of: one, many, exec, execrows
	Comments []string

	// XXX: Hack
	Filename string
}

Name and Cmd may be empty Maybe I don't need the SQL string if I have the raw Stmt?

type QueryCatalog

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

func (QueryCatalog) GetTable

func (qc QueryCatalog) GetTable(fqn core.FQN) (core.Table, *core.Error)

type Result

type Result struct {
	Queries []*Query
	Catalog core.Catalog
}

func ParseQueries

func ParseQueries(c core.Catalog, queriesPaths []string, opts ParserOpts) (*Result, error)

func (Result) Enums

func (r Result) Enums(settings config.CombinedSettings) []golang.Enum

func (Result) GoQueries

func (r Result) GoQueries(settings config.CombinedSettings) []golang.Query

func (Result) Structs

func (r Result) Structs(settings config.CombinedSettings) []golang.Struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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