Skip to content

Derive a canonical ooName for each object-model method#49

Merged
estebanzimanyi merged 1 commit into
masterfrom
feat/objectmodel-oonames
Jul 11, 2026
Merged

Derive a canonical ooName for each object-model method#49
estebanzimanyi merged 1 commit into
masterfrom
feat/objectmodel-oonames

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Give every classified objectModel method a single canonical camelCase ooName, so the object-oriented bindings (PyMEOS, JMEOS, GoMEOS, MEOS.js, meos-rs, MEOS.NET) can generate their OO method surface instead of hand-writing it.

Why. The catalog already gives the SQL bindings a canonical name (the portableAliases bare-name dialect). The OO bindings had no equivalent — objectModel methods carried only {function, role, scope, backing}, and the method name is not mechanically obvious from the C name. Every OO binding therefore hand-writes its method names. This adds the missing projection.

How. The name is derived, not transcribed: strip the class type-token the function-name object model encodes (tfloat_end_value on TFloatend_value), camel-case it, and keep acronym runs upper-case (tfloat_as_hexwkbasHexWKB). Each binding then applies one deterministic case transform — camel→snake (Python/Rust), camel→exported-Pascal (Go/C#), identity (Java/JS).

Per method the model now carries:

  • ooName — the canonical camelCase name (1374 methods).
  • ooExclude — internal machinery that is not a user method: SQL aggregate transition/final/combine functions and comparators with no @sqlfn (qsort/bound sort helpers). 76 excluded.
  • ooSugar — a hint that the function warrants kept, binding-dependent idiomatic sugar layered on top of the canonical method, never replacing it: operator (comparisons → __eq__ / == / equals / traits), cast (_to_:: and target-type constructor), io (_in/_out → constructor-from-text / text output).

The curated inputs (acronym set, exclusion rules, an intentionally-empty override table) live beside _role in parser/object_model.py. Legacy per-binding spellings are deliberately not carried forward — the clean derived name is canonical.

ooMethods / ooExcluded are reported in the object-model summary. No behavioural change to any existing facet; test_object_model.py stays green.

Give every classified objectModel method a single canonical camelCase
ooName, derived from the C backing by stripping the class type-token the
function-name object model encodes and camel-casing the remainder with
acronym runs kept upper-case (as_hex_wkb C name -> asHexWKB). Bindings render
it with one deterministic per-language case transform. Flag internal
machinery (aggregate transition helpers, SQL-less comparators) with
ooExclude, and annotate the functions that warrant kept idiomatic sugar
(operator, cast, io) so each binding can add operators, :: casts and text
I/O on top of the canonical method. Report ooMethods / ooExcluded in the
object-model summary.
@estebanzimanyi estebanzimanyi merged commit a456bc1 into master Jul 11, 2026
2 checks passed
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