Documentation ¶
Index ¶
- Variables
- func ParseTableName(node ast.Node) (*ast.TableName, error)
- func ParseTypeName(node ast.Node) (*ast.TypeName, error)
- type Column
- type Compiler
- func (c *Compiler) Catalog() *catalog.Catalog
- func (c *Compiler) Close(ctx context.Context)
- func (c *Compiler) OutputColumns(stmt ast.Node) ([]*catalog.Column, error)
- func (c *Compiler) ParseCatalog(schema []string) error
- func (c *Compiler) ParseQueries(queries []string, o opts.Parser) error
- func (c *Compiler) Result() *Result
- type Function
- type Parameter
- type Parser
- type Query
- type QueryCatalog
- type Relation
- type Result
- type Table
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 (*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() source.CommentSyntax IsReservedKeyword(string) bool }
TODO: Rename this interface Engine
type QueryCatalog ¶
type QueryCatalog struct {
// contains filtered or unexported fields
}
type Relation ¶
func ParseRelationString ¶
Click to show internal directories.
Click to hide internal directories.