|
|
@ -307,7 +307,6 @@ func GetRow(dbName, table_name, alias string, titles string, with, join [][]stri |
|
|
|
withSql := "" |
|
|
|
if len(with) > 0 { |
|
|
|
var builder strings.Builder |
|
|
|
builder.Reset() |
|
|
|
builder.WriteString("WITH ") |
|
|
|
boo := false |
|
|
|
for k, v := range with { |
|
|
@ -354,12 +353,11 @@ func GetRow(dbName, table_name, alias string, titles string, with, join [][]stri |
|
|
|
|
|
|
|
if len(join) > 0 { |
|
|
|
var builder strings.Builder |
|
|
|
builder.Reset() |
|
|
|
builder.WriteString(sql_str) |
|
|
|
for _, joinitem := range join { |
|
|
|
if len(joinitem) < 2 { |
|
|
|
continue |
|
|
|
} |
|
|
|
builder.WriteString(sql_str) |
|
|
|
builder.WriteString(" ") |
|
|
|
if len(joinitem) >= 3 { |
|
|
|
builder.WriteString(joinitem[2]) |
|
|
@ -498,7 +496,6 @@ func FetchRows(dbName, table_name, alias string, titles string, with, join [][]s |
|
|
|
withSql := "" |
|
|
|
if len(with) > 0 { |
|
|
|
var builder strings.Builder |
|
|
|
builder.Reset() |
|
|
|
builder.WriteString("WITH ") |
|
|
|
boo := false |
|
|
|
for k, v := range with { |
|
|
@ -546,12 +543,12 @@ func FetchRows(dbName, table_name, alias string, titles string, with, join [][]s |
|
|
|
|
|
|
|
if len(join) > 0 { |
|
|
|
var builder strings.Builder |
|
|
|
builder.Reset() |
|
|
|
builder.WriteString(sql_str) |
|
|
|
for _, joinitem := range join { |
|
|
|
if len(joinitem) < 2 { |
|
|
|
continue |
|
|
|
} |
|
|
|
builder.WriteString(sql_str) |
|
|
|
|
|
|
|
builder.WriteString(" ") |
|
|
|
if len(joinitem) >= 3 { |
|
|
|
builder.WriteString(joinitem[2]) |
|
|
|