Skip to content

Hand on whatever the wrapper already states as a value - #32

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/values-the-wrapper-states
Sep 3, 2026
Merged

Hand on whatever the wrapper already states as a value#32
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/values-the-wrapper-states

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The object layer kept its own account of which C types are values — one enum
named in a branch, and a set of C spellings beside it — while the flat surface
had already resolved every one of them from the catalog. So a method taking the
nullHandleType the catalog names, or answering an S2CellId, a float8 or an
Oid, was deferred to that surface for a type sitting two lines away in it.

The wrapper's own C# type is the answer: a scalar it resolved through the
catalog's typedefs, a struct it carries by value, or an enum the catalog names,
in which case the method takes and answers that enum rather than its number. 18
methods reach the object layer that way — TJsonb.ArrayElement and its ten
jsonb siblings taking a NullHandleType, Raquet.Make a MeosPixType,
Geo.ToS2cellCell answering a ulong, TPoint.AsMvtgeom an MvtGeom and
TGeo.SpaceSplit a SpaceSplit — 1264 methods against 1246, 31 deferred
against 49.

Three tests read the three kinds back: a temporal jsonb given the enum the
catalog names, a geometry answering its S2 cell as the number MEOS states, and
a temporal point answering the struct it fills.

The object layer kept its own account of which C types are values — one enum
named in a branch, and a set of C spellings beside it — while the flat surface
had already resolved every one of them from the catalog. So a method taking the
`nullHandleType` the catalog names, or answering an `S2CellId`, a `float8` or an
`Oid`, was deferred to that surface for a type sitting two lines away in it.

The wrapper's own C# type is the answer: a scalar it resolved through the
catalog's typedefs, a struct it carries by value, or an enum the catalog names,
in which case the method takes and answers that enum rather than its number. 18
methods reach the object layer that way — `TJsonb.ArrayElement` and its ten
jsonb siblings taking a `NullHandleType`, `Raquet.Make` a `MeosPixType`,
`Geo.ToS2cellCell` answering a `ulong`, `TPoint.AsMvtgeom` an `MvtGeom` and
`TGeo.SpaceSplit` a `SpaceSplit` — 1264 methods against 1246, 31 deferred
against 49.

Three tests read the three kinds back: a temporal jsonb given the enum the
catalog names, a geometry answering its S2 cell as the number MEOS states, and
a temporal point answering the struct it fills.
@estebanzimanyi
estebanzimanyi merged commit 0729000 into MobilityDB:main Sep 3, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the feat/values-the-wrapper-states branch September 3, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant