Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedStatementType = errors.New("parseQuery: unsupported statement type")
Functions ¶
Types ¶
type Column ¶
type Column struct {
Name string
OriginalName string
DataType string
NotNull bool
Unsigned bool
IsArray bool
ArrayDims int
Comment string
Length *int
IsNamedParam bool
IsFuncCall bool
// XXX: Figure out what PostgreSQL calls `foo.id`
Scope string
Table *ast.TableName
TableAlias string
Type *ast.TypeName
EmbedTable *ast.TableName
IsSqlcSlice bool // is this sqlc.slice()
// contains filtered or unexported fields
}
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler(conf config.SQL, combo config.CombinedSettings) *Compiler
func (*Compiler) OutputColumns ¶
OutputColumns determines which columns a statement will output
func (*Compiler) ParseCatalog ¶
func (*Compiler) ParseQueries ¶
type Parser ¶
type Parser interface {
Parse(io.Reader) ([]ast.Statement, error)
CommentSyntax() metadata.CommentSyntax
IsReservedKeyword(string) bool
}
TODO: Rename this interface Engine
type Query ¶
type Query struct {
SQL string
Name string
Cmd string // TODO: Pick a better name. One of: one, many, exec, execrows, copyFrom
Flags map[string]bool
Columns []*Column
Params []Parameter
Comments []string
// XXX: Hack
Filename string
// Needed for CopyFrom
InsertIntoTable *ast.TableName
// Needed for vet
RawStmt *ast.RawStmt
}
type QueryCatalog ¶
type QueryCatalog struct {
// contains filtered or unexported fields
}
type Relation ¶
func ParseRelationString ¶
Click to show internal directories.
Click to hide internal directories.