Sql builder generator for postgres database.

This commit is contained in:
sub0Zero 2019-03-03 17:54:43 +01:00 committed by zer0sub
parent 3190d6f933
commit 92edc96c9a
10 changed files with 403 additions and 9 deletions

View file

@ -131,11 +131,9 @@ func (t *Table) ForceIndex(index string) *Table {
// Generates the sql string for the current table expression. Note: the
// generated string may not be a valid/executable sql statement.
func (t *Table) SerializeSql(database string, out *bytes.Buffer) error {
_, _ = out.WriteString("`")
_, _ = out.WriteString(database)
_, _ = out.WriteString("`.`")
_, _ = out.WriteString(".")
_, _ = out.WriteString(t.Name())
_, _ = out.WriteString("`")
if t.forcedIndex != "" {
if !validIdentifierName(t.forcedIndex) {