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

Function ExtractStringValue

common/sqlquery/query.go:35–40  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

33}
34
35func ExtractStringValue(s string) (string, error) {
36 if len(s) >= 2 && s[0] == '\'' && s[len(s)-1] == '\'' {
37 return s[1 : len(s)-1], nil
38 }
39 return "", fmt.Errorf("value %s is not a string value", s)
40}
41
42func ExtractIntValue(s string) (int, error) {
43 intValue, err := strconv.Atoi(s)

Callers 8

evaluateComparisonMethod · 0.92
evaluateComparisonMethod · 0.92
evaluateComparisonMethod · 0.92
convertComparisonExprMethod · 0.92
convertComparisonExprMethod · 0.92
convertComparisonExprMethod · 0.92
ConvertToTimeFunction · 0.85
TestExtractStringValueFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by 1

TestExtractStringValueFunction · 0.68