Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (35 sloc) 715 Bytes
package lore
import (
sqlPart is directly imported from Squirrel.part.
type sqlPart struct {
pred interface{}
args []interface{}
newSqlPart is directly imported from Squirrel.newPart.
func newSqlPart(pred interface{}, args ...interface{}) *sqlPart {
return &sqlPart{pred, args}
ToSql is directly imported from Squirrel.part.ToSql.
func (p sqlPart) ToSql() (sql string, args []interface{}, err error) {
switch pred := p.pred.(type) {
case nil:
// no-op
case squirrel.Sqlizer:
sql, args, err = pred.ToSql()
case string:
sql = pred
args = p.args
err = fmt.Errorf("expected string or Sqlizer, not %T", pred)
You can’t perform that action at this time.