Skip to content

Exclude internal-API functions from a class's OO method list#72

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/object-model-public-methods
Jul 23, 2026
Merged

Exclude internal-API functions from a class's OO method list#72
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/object-model-public-methods

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The object model classifies every function whose name matches a class prefix into
objectModel.classes[<class>].methods — including the ones the catalog marks
api: internal: the _p peeks (temporal_inst_n, temporal_start_inst), the bbox
and skiplist plumbing, the raw *_in/*_out. For the Temporal class that is 59 of
162 entries
.

A binding that generates its object layer from that list would emit 59 methods it cannot
call — they are not public exports — so every binding has to re-derive the public/internal
split the catalog already records in the api field.

This treats a non-public function as internal machinery in _oo_excluded, alongside the
aggregate transition helpers and the SQL-less comparators it already excludes. The function
stays classified (so functionToClass and the reverse index remain complete) but carries
ooExclude, exactly as those other internal entries do, and a binding keeps only
not m['ooExclude'].

Against MobilityDB master the Temporal list goes from mixing 59 internal entries to 97
clean public methods, with none leaking through
. Full suite: 186 passed, plus a new test
asserting a public method is kept and an internal one is flagged. (test_struct_layout's
one failure is the pre-existing source-tree-parse approximation — it fails identically on
master and passes on the installed-header CI path.)

The object model classifies every function whose name matches a class prefix
into classes[<class>].methods, including the ones the catalog marks internal:
the _p peeks, the bbox and skiplist plumbing, the raw _in/_out. For the Temporal
class that is 59 of 162 entries. A binding that generates its object layer from
this list would emit methods it cannot call, so each binding would re-derive the
public/internal split the catalog already records in the api field.

Treat a non-public function as internal machinery in _oo_excluded, alongside the
aggregate transition helpers and the SQL-less comparators it already excludes.
The function stays in the list with ooExclude set, so the reverse index remains
complete and a binding keeps only the entries without the flag. The Temporal
public method count goes from a list mixing 59 internal entries to 97 clean ones,
with none leaking through.
@estebanzimanyi
estebanzimanyi merged commit 4e302fb into MobilityDB:master Jul 23, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/object-model-public-methods branch July 23, 2026 06:10
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