Esempio n. 1
0
func (ø *Field) Placeholder() Placeholder {
	fn := func(in interface{}) (out string) {
		tv := ø.MustValue(in)
		return tv.Sql().String()
	}
	t := template.NewPlaceholder(ø.Table.Name+"."+ø.Name, fn)
	return typedPlaceholder{t}
}
Esempio n. 2
0
func (ø SqlType) Placeholder() Placeholder {
	t := template.NewPlaceholder("sql."+ø.String(), handleSql)
	// t := templ.NewPlaceholder("sql."+ø.String(), handleSql)
	return typedPlaceholder{t}
}
Esempio n. 3
0
func (ø *TypedValue) Placeholder() Placeholder {
	t := template.NewPlaceholder(ø.PgType.String(), escapeValue)
	return typedPlaceholder{t}
}
Esempio n. 4
0
func (ø SearchBoth) Placeholder() Placeholder {
	t := template.NewPlaceholder(reflect.TypeOf(ø).Name()+"."+string(ø), escapeSearchBoth)
	return typedPlaceholder{t}
}