Skip to content

Answer a MEOS struct the model gives no class as the handle it already is - #28

Closed
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/surface-the-handle-for-a-classless-struct
Closed

Answer a MEOS struct the model gives no class as the handle it already is#28
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/surface-the-handle-for-a-classless-struct

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Nine of the structs the flat layer wraps have no class in the object model, and
each correctly has none: Interval is PostgreSQL's and absent from the MeosType
enum; SkipList, PJ_CONTEXT and gsl_rng are runtime handles MEOS registers
in no enum; AFFINE, BOX3D, GBOX and Match state their whole layout in
scalars; Rgeo is the ninth. A method carrying one was deferred, which cost 53
methods -- Interval alone accounts for 46.

The flat handle IS the type for these, and its semantics are already the ones
the ecosystem states for such a struct: the call hands MEOS an address and the
memory stays MEOS's. Spelling a value struct here instead is not available in any
case -- this package imports no cgo (0 of 116 files against 15 in functions/), so
it cannot materialise a C struct, and only the functions package can.

One rule covers all nine rather than a list of them: a wrapper type the model
resolves to no class is handed through as the wrapper's own type, the same way
the generated enums already cross.

MEASURED: 1309 methods against 1256, deferrals 105 -> 52, and every one of the 52
now reads has no emitted wrapper -- so the object layer defers ONLY what the
flat generator does not emit, and holds no gap of its own. go build ./... over
all 12 packages, go vet ./types and gofmt -l types/ (0 files) are clean, and a
second generator run reproduces the tree byte for byte.

…y is

Nine of the structs the flat layer wraps have no class in the object model, and
each correctly has none: `Interval` is PostgreSQL's and absent from the MeosType
enum; `SkipList`, `PJ_CONTEXT` and `gsl_rng` are runtime handles MEOS registers
in no enum; `AFFINE`, `BOX3D`, `GBOX` and `Match` state their whole layout in
scalars; `Rgeo` is the ninth. A method carrying one was deferred, which cost 53
methods -- `Interval` alone accounts for 46.

The flat handle IS the type for these, and its semantics are already the ones
the ecosystem states for such a struct: the call hands MEOS an address and the
memory stays MEOS's. Spelling a value struct here instead is not available in any
case -- this package imports no cgo (0 of 116 files against 15 in functions/), so
it cannot materialise a C struct, and only the `functions` package can.

One rule covers all nine rather than a list of them: a wrapper type the model
resolves to no class is handed through as the wrapper's own type, the same way
the generated enums already cross.

MEASURED: 1309 methods against 1256, deferrals 105 -> 52, and every one of the 52
now reads `has no emitted wrapper` -- so the object layer defers ONLY what the
flat generator does not emit, and holds no gap of its own. `go build ./...` over
all 12 packages, `go vet ./types` and `gofmt -l types/` (0 files) are clean, and a
second generator run reproduces the tree byte for byte.
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Superseded: mirrors the sibling wrongly. MEOS.NET configure(idl) SPLITS the classless structs -- all-scalar and no class are carried BY VALUE (AFFINE, BOX3D, Interval, Match), the rest stay opaque pointers -- where this treats all nine as handles. Replacement derives the same facts from the catalog and retires the hand TYPE_MAP enum list.

@estebanzimanyi
estebanzimanyi deleted the feat/surface-the-handle-for-a-classless-struct branch September 3, 2026 17:02
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