MCPcopy Create free account
hub / github.com/temporalio/temporal / LoadAndSplitQuery

Function LoadAndSplitQuery

common/persistence/query_util.go:37–51  ·  view source on GitHub ↗

LoadAndSplitQuery loads and split cql / sql query into one statement per string. Comments are removed from the query.

(
	filePaths []string,
)

Source from the content-addressed store, hash-verified

35// LoadAndSplitQuery loads and split cql / sql query into one statement per string.
36// Comments are removed from the query.
37func LoadAndSplitQuery(
38 filePaths []string,
39) ([]string, error) {
40 var files []io.Reader
41
42 for _, filePath := range filePaths {
43 f, err := os.Open(filePath)
44 if err != nil {
45 return nil, fmt.Errorf("error opening file %s: %w", filePath, err)
46 }
47 files = append(files, f)
48 }
49
50 return LoadAndSplitQueryFromReaders(files)
51}
52
53// LoadAndSplitQueryFromReaders loads and split cql / sql query into one statement per string.
54// Comments are removed from the query.

Callers 2

RunParseFileTestMethod · 0.92
LoadSchemaFunction · 0.92

Calls 2

ErrorfMethod · 0.45

Tested by 1

LoadSchemaFunction · 0.74