Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuoteIdentifier ¶
QuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be used as part of an SQL statement. For example:
tblname := "my_table" data := "my_data" quoted := pq.QuoteIdentifier(tblname) err := db.Exec(fmt.Sprintf("INSERT INTO %s VALUES ($1)", quoted), data)
Any double quotes in name will be escaped. The quoted identifier will be case-sensitive when used in a query. If the input string contains a zero byte, the result will be truncated immediately before it.
It's a copy of the function from github.com/lib/pq.
Types ¶
type StmtParams ¶
type StmtParams struct {
// contains filtered or unexported fields
}
StmtParams is a helper for generating prepared statement parameters, i.e. $1, $2, $3, ...
Click to show internal directories.
Click to hide internal directories.