MCPcopy Create free account
hub / github.com/dataease/SQLBot / opUDT

Function opUDT

frontend/public/swagger-ui-bundle.js:43265–43313  ·  view source on GitHub ↗
(o, C)

Source from the content-addressed store, hash-verified

43263 )
43264 }
43265 },
43266 opUDT = (o, C) => {
43267 let $, U, V
43268 const z = w[o],
43269 Z = _[z.index]
43270 ;((Y.UdtIndex = Z.index),
43271 B ||
43272 ((V = i.ast && i.ast.udtDefined(z.index)),
43273 V &&
43274 ((U = u.length + z.index), ($ = i.ast.getLength()), i.ast.down(U, Z.name))))
43275 const ee = x.length - C
43276 ;(j[z.index](Y, x, C, L),
43277 ((o, i, u) => {
43278 if (i.phraseLength > u) {
43279 let s = `${a}opUDT(${o.name}): callback function error: `
43280 throw (
43281 (s += `sysData.phraseLength: ${i.phraseLength}`),
43282 (s += ` must be <= remaining chars: ${u}`),
43283 new Error(s)
43284 )
43285 }
43286 switch (i.state) {
43287 case s.ACTIVE:
43288 throw new Error(`${a}opUDT(${o.name}) ACTIVE state return not allowed.`)
43289 case s.EMPTY:
43290 if (!o.empty) throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`)
43291 i.phraseLength = 0
43292 break
43293 case s.MATCH:
43294 if (0 === i.phraseLength) {
43295 if (!o.empty)
43296 throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`)
43297 i.state = s.EMPTY
43298 }
43299 break
43300 case s.NOMATCH:
43301 i.phraseLength = 0
43302 break
43303 default:
43304 throw new Error(
43305 `${a}opUDT(${o.name}): callback function return error. Unrecognized return state: ${i.state}`
43306 )
43307 }
43308 })(Z, Y, ee),
43309 B ||
43310 (V &&
43311 (Y.state === s.NOMATCH
43312 ? i.ast.setLength($)
43313 : i.ast.up(U, Z.name, C, Y.phraseLength))))
43314 },
43315 opExecute = (o, _) => {
43316 const j = `${a}opExecute(): `,

Callers 1

opExecuteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected