MCPcopy Create free account
hub / github.com/Effect-TS/effect / isSegment

Function isSegment

packages/effect/src/unstable/sql/Statement.ts:1421–1438  ·  view source on GitHub ↗
(u: unknown)

Source from the content-addressed store, hash-verified

1419 })
1420
1421const isSegment = (u: unknown): u is Segment => {
1422 if (!hasProperty(u, "_tag")) {
1423 return false
1424 }
1425 switch (u._tag) {
1426 case "Literal":
1427 case "Parameter":
1428 case "ArrayHelper":
1429 case "RecordInsertHelper":
1430 case "RecordUpdateHelper":
1431 case "RecordUpdateHelperSingle":
1432 case "Identifier":
1433 case "Custom":
1434 return true
1435 default:
1436 return false
1437 }
1438}
1439
1440function convertLiteralOrFragment(clause: string | Fragment): Array<Segment> {
1441 if (typeof clause === "string") {

Callers 1

statementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected