Derive a canonical ooName for each object-model method#49
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Give every classified
objectModelmethod a single canonical camelCaseooName, 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
portableAliasesbare-name dialect). The OO bindings had no equivalent —objectModelmethods 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_valueonTFloat→end_value), camel-case it, and keep acronym runs upper-case (tfloat_as_hexwkb→asHexWKB). 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
_roleinparser/object_model.py. Legacy per-binding spellings are deliberately not carried forward — the clean derived name is canonical.ooMethods/ooExcludedare reported in the object-model summary. No behavioural change to any existing facet;test_object_model.pystays green.