示例#1
0
文件: table.go 项目: hafeez3000/csfw
// 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
文件: table.go 项目: hafeez3000/csfw
// 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
文件: csdb.go 项目: bom-d-van/csfw
// 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...)...)
}