SQL returns the SQL representation of this VALUES clause as "VALUES (v1, v2), (v3, v4), ...".
()
| 967 | // SQL returns the SQL representation of this VALUES clause as |
| 968 | // "VALUES (v1, v2), (v3, v4), ...". |
| 969 | func (v *Values) SQL() string { |
| 970 | if v == nil { |
| 971 | return "" |
| 972 | } |
| 973 | rows := make([]string, len(v.Rows)) |
| 974 | for i, row := range v.Rows { |
| 975 | vals := make([]string, len(row)) |
| 976 | for j, val := range row { |
| 977 | vals[j] = exprSQL(val) |
| 978 | } |
| 979 | rows[i] = "(" + strings.Join(vals, ", ") + ")" |
| 980 | } |
| 981 | return "VALUES " + strings.Join(rows, ", ") |
| 982 | } |
| 983 | |
| 984 | // SQL returns the full SQL string for this CREATE VIEW statement including the |
| 985 | // optional OR REPLACE, TEMPORARY, IF NOT EXISTS, column list, SELECT query, |