MCPcopy
hub / github.com/jmoiron/sqlx / Preparex

Function Preparex

sqlx.go:663–669  ·  view source on GitHub ↗

Preparex prepares a statement.

(p Preparer, query string)

Source from the content-addressed store, hash-verified

661
662// Preparex prepares a statement.
663func Preparex(p Preparer, query string) (*Stmt, error) {
664 s, err := p.Prepare(query)
665 if err != nil {
666 return nil, err
667 }
668 return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err
669}
670
671// Select executes a query using the provided Queryer, and StructScans each row
672// into dest, which must be a slice. If the slice elements are scannable, then

Callers 3

PreparexMethod · 0.85
PreparexMethod · 0.85
prepareNamedFunction · 0.85

Calls 3

isUnsafeFunction · 0.85
mapperForFunction · 0.85
PrepareMethod · 0.80

Tested by

no test coverage detected