MCPcopy
hub / github.com/Masterminds/squirrel / ToSql

Method ToSql

select.go:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (d *selectData) ToSql() (sqlStr string, args []interface{}, err error) {
55 sqlStr, args, err = d.toSqlRaw()
56 if err != nil {
57 return
58 }
59
60 sqlStr, err = d.PlaceholderFormat.ReplacePlaceholders(sqlStr)
61 return
62}
63
64func (d *selectData) toSqlRaw() (sqlStr string, args []interface{}, err error) {
65 if len(d.Columns) == 0 {

Callers

nothing calls this directly

Calls 2

toSqlRawMethod · 0.95
ReplacePlaceholdersMethod · 0.65

Tested by

no test coverage detected