MCPcopy Create free account
hub / github.com/AdRoll/baker / sqliteQuote

Function sqliteQuote

output/sqlite.go:253–255  ·  view source on GitHub ↗

sqliteQuote returns a manually escaped string replacing single quotes with double-single quotes

(str string)

Source from the content-addressed store, hash-verified

251
252// sqliteQuote returns a manually escaped string replacing single quotes with double-single quotes
253func sqliteQuote(str string) string {
254 return "'" + strings.ReplaceAll(str, "'", "''") + "'"
255}
256
257// prepInsertStatement prepares and returns the statement inserting records.
258func (c *SQLite) prepInsertStatement(tx *sql.Tx) (*sql.Stmt, error) {

Callers 3

prepInsertStatementMethod · 0.85
maybeTruncateMethod · 0.85
setupTableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected