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

Function extractLimitValue

backend/plugin/db/starrocks/query.go:230–240  ·  view source on GitHub ↗
(node ast.Node)

Source from the content-addressed store, hash-verified

228}
229
230func extractLimitValue(node ast.Node) int {
231 lit, ok := node.(*ast.Literal)
232 if !ok || lit.Kind != ast.LitInt {
233 return -1
234 }
235 val, err := strconv.Atoi(lit.Value)
236 if err != nil {
237 return -1
238 }
239 return val
240}
241
242func literalLoc(node ast.Node) ast.Loc {
243 lit, ok := node.(*ast.Literal)

Callers 2

rewriteSelectLimitFunction · 0.85
rewriteSetOpLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected