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

Function rangeFlags

packages/sql/pg/src/PgTypes.ts:1896–1903  ·  view source on GitHub ↗
(range: Range<unknown>)

Source from the content-addressed store, hash-verified

1894}
1895
1896const rangeFlags = (range: Range<unknown>): number => {
1897 let flags = 0
1898 if (range.lower === null) flags |= RANGE_LB_INF
1899 else if (range.lowerInclusive) flags |= RANGE_LB_INC
1900 if (range.upper === null) flags |= RANGE_UB_INF
1901 else if (range.upperInclusive) flags |= RANGE_UB_INC
1902 return flags
1903}
1904
1905/**
1906 * PostgreSQL range_send: a flags byte, then an int32 length and subtype bytes

Callers 2

encodeRangeFunction · 0.85
writeRangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected