Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNamedQueryMalformed = errors.New("named query is malformed")
Functions ¶
func AppendValue ¶
AppendValue appends to dst a UTF-8 string representation of src. Byte slices will be formatted via RFC 4648 Base64.
Types ¶
type NamedQuery ¶
type NamedQuery struct { Query string `json:"query"` Parsed string `json:"parsed"` Names []string `json:"names"` }
NamedQuery is the parsed result of a SQL statement with named parameters.
func ParseNamedQuery ¶
func ParseNamedQuery(query string) (res NamedQuery, err error)
ParseNamedQuery parses a SQL statement with named parameters, replaces those named parameters with ?, and returns the parameter names sorted in the order from the start to the end of the SQL statement.
Click to show internal directories.
Click to hide internal directories.