Documentation
¶
Overview ¶
Package block handles the parsing of SQL query blocks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Path string
Name string
Command Command
SQL string
Doc string
Line int
Column int
StartOffset int
EndOffset int
Suffix string
ParamTypes []ParamTypeOverride // Explicit type overrides from @param comments
}
Block represents a parsed SQL query block.
type Command ¶
type Command int
Command represents the type of query (one, many, exec, etc.).
const ( // CommandUnknown indicates an unrecognized command. CommandUnknown Command = iota // CommandOne indicates a query returning a single row. CommandOne // CommandMany indicates a query returning multiple rows. CommandMany // CommandExec indicates a query that executes without returning rows. CommandExec // CommandExecResult indicates a query that returns execution result (rows affected, etc.). CommandExecResult )
func ParseCommand ¶
ParseCommand parses a command tag (e.g., ":one") into a Command.
type ParamTypeOverride ¶ added in v0.5.0
ParamTypeOverride represents an explicit type override for a parameter.
Click to show internal directories.
Click to hide internal directories.