| 1206 | } |
| 1207 | |
| 1208 | func buildOrderByClauseString(handleColNames []string) string { |
| 1209 | if len(handleColNames) == 0 { |
| 1210 | return "" |
| 1211 | } |
| 1212 | separator := "," |
| 1213 | quotaCols := make([]string, len(handleColNames)) |
| 1214 | for i, col := range handleColNames { |
| 1215 | quotaCols[i] = fmt.Sprintf("`%s`", escapeString(col)) |
| 1216 | } |
| 1217 | return fmt.Sprintf("ORDER BY %s", strings.Join(quotaCols, separator)) |
| 1218 | } |
| 1219 | |
| 1220 | func buildLockTablesSQL(allTables DatabaseTables, blockList map[string]map[string]any) string { |
| 1221 | // ,``.`` READ has 11 bytes, "LOCK TABLE" has 10 bytes |