Пример #1
0
// ColumnAliasQuote prefixes non-id columns with an alias and puts quotes around them. Returns a copy.
func (ts *Table) ColumnAliasQuote(alias string) []string {
	return dbr.TableColumnQuote(alias, append([]string(nil), ts.fields...)...)
}
Пример #2
0
// AllColumnAliasQuote prefixes all columns with an alias and puts quotes around them. Returns a copy.
func (ts *Table) AllColumnAliasQuote(alias string) []string {
	c := append([]string(nil), ts.fieldsPK...)
	return dbr.TableColumnQuote(alias, append(c, ts.fields...)...)
}
Пример #3
0
// AllColumnAliasQuote prefixes all columns with an alias and puts quotes around them. Returns a copy.
func (ts *TableStructure) AllColumnAliasQuote(alias string) []string {
	c := append([]string(nil), ts.IDFieldNames...)
	return dbr.TableColumnQuote(alias, append(c, ts.Columns...)...)
}