temporalio/temporal · error
error opening file %s: %w
Error message
error opening file %s: %w
What it means
Error "error opening file %s: %w" thrown in temporalio/temporal.
Source
Thrown at common/persistence/query_util.go:46
sqlLoopKeyword = "loop"
sqlBeginKeyword = "begin"
sqlEndKeyword = "end"
sqlLineComment = "--"
sqlSingleQuote = '\''
sqlDoubleQuote = '"'
)
// LoadAndSplitQuery loads and split cql / sql query into one statement per string.
// Comments are removed from the query.
func LoadAndSplitQuery(
filePaths []string,
) ([]string, error) {
var files []io.Reader
for _, filePath := range filePaths {
f, err := os.Open(filePath)
if err != nil {
return nil, fmt.Errorf("error opening file %s: %w", filePath, err)
}
files = append(files, f)
}
return LoadAndSplitQueryFromReaders(files)
}
// LoadAndSplitQueryFromReaders loads and split cql / sql query into one statement per string.
// Comments are removed from the query.
func LoadAndSplitQueryFromReaders(
readers []io.Reader,
) ([]string, error) {
result := make([]string, 0, querySliceDefaultSize)
for _, r := range readers {
content, err := io.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("error reading contents: %w", err)
}View on GitHub (pinned to bde624efd1)
When it happens
Trigger: Thrown at common/persistence/query_util.go:46 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01).
Data as JSON: /api/errors/e6db282a91bb6565.
Report an issue: GitHub.