Skip to content

Take an untyped pointer as a pointer, and call what answers nothing - #34

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/untyped-pointers-and-void-methods
Sep 3, 2026
Merged

Take an untyped pointer as a pointer, and call what answers nothing#34
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/untyped-pointers-and-void-methods

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

An UNTYPED pointer stays untyped. MEOS states nothing about what a void *
points at — rtree_insert takes whichever key the tree is created for — so the
layer states nothing either and the caller hands over the pointer of the value
it means, the Ptr every wrapped instance publishes. GoMEOS answers the same
shape with unsafe.Pointer.

A STATIC METHOD THAT ANSWERS NOTHING IS STILL A METHOD. "Neither a receiver nor
a value to return" is true of such a signature and false of what it does:
Pcschema.Register puts a schema in the process-global cache, Pcschema.Clear
empties it, and the two kNN cursors are closed the same way. A method is called
for what it does as much as for what it answers.

11 methods reach the object layer between them — RTree.Insert, .Search,
.Load and their SP-tree twins, MeosArray.Add and .Get, Pcschema.Register,
.RegisterXml and .Clear, and the two cursor closes — 1335 methods against
1324, 25 deferred against 36.

Two tests call both kinds: an R-tree over float spans takes two of them as
pointers and answers 1 for the one that overlaps, and the schema cache is
cleared and then says so — by raising, which is how MEOS reports a pcid it holds
no schema for.

An UNTYPED pointer stays untyped. MEOS states nothing about what a `void *`
points at — `rtree_insert` takes whichever key the tree is created for — so the
layer states nothing either and the caller hands over the pointer of the value
it means, the `Ptr` every wrapped instance publishes. GoMEOS answers the same
shape with `unsafe.Pointer`.

A STATIC METHOD THAT ANSWERS NOTHING IS STILL A METHOD. "Neither a receiver nor
a value to return" is true of such a signature and false of what it does:
`Pcschema.Register` puts a schema in the process-global cache, `Pcschema.Clear`
empties it, and the two kNN cursors are closed the same way. A method is called
for what it does as much as for what it answers.

11 methods reach the object layer between them — `RTree.Insert`, `.Search`,
`.Load` and their SP-tree twins, `MeosArray.Add` and `.Get`, `Pcschema.Register`,
`.RegisterXml` and `.Clear`, and the two cursor closes — 1335 methods against
1324, 25 deferred against 36.

Two tests call both kinds: an R-tree over float spans takes two of them as
pointers and answers 1 for the one that overlaps, and the schema cache is
cleared and then says so — by raising, which is how MEOS reports a pcid it holds
no schema for.
@estebanzimanyi
estebanzimanyi merged commit 977217a into MobilityDB:main Sep 3, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the feat/untyped-pointers-and-void-methods branch September 3, 2026 10:27
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