MCPcopy Create free account
hub / github.com/bytebase/bytebase / getTemporaryView

Function getTemporaryView

backend/plugin/db/starrocks/dump.go:239–246  ·  view source on GitHub ↗
(name string, columns []string)

Source from the content-addressed store, hash-verified

237}
238
239func getTemporaryView(name string, columns []string) string {
240 var parts []string
241 for _, col := range columns {
242 parts = append(parts, fmt.Sprintf("1 AS `%s`", col))
243 }
244 stmt := fmt.Sprintf("CREATE VIEW `%s` AS SELECT\n %s;\n", name, strings.Join(parts, ",\n "))
245 return fmt.Sprintf(tempViewStmtFmt, name, stmt)
246}
247
248func getTemporaryMaterializedView(name string, columns []string) string {
249 var parts []string

Callers 2

TestGetTemporaryViewFunction · 0.85
DumpMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by 1

TestGetTemporaryViewFunction · 0.68