GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Record ids in rows: pin the contract both wheels share (tests and docs) by tae898 · Pull Request #530 · humemai/arcadedb-embedded-python

This repository was archived by the owner on Nov 21, 2026. It is now read-only.

Conversation

@tae898

@tae898 tae898 commented Oct 25, 2026

Copy link
Copy Markdown

A record id inside a row came back as two different things: the JVM wheel hands out the engine's own RID (a JPype object whose str() is #10:5), the native wheel a Python class of its own. A digest of the same query on both wheels showed it. This PR pins what the two have in common, so that code written against one runs on the other. The JVM wheel needs no code change: its behaviour is the contract.

The contract, written in docs/api/results.md under "Record ids in rows": a record id in a row value (SELECT @rid, a LINK property, a list of links) is an RID object; str(rid) is the text; RIDs of one record are equal and hash alike; RIDs sort by bucket and position; getBucketId(), getPosition(), toString() and isValid() work; it goes back in as a query parameter and to lookup_by_rid() as itself or as its text; get_rid() is text or None. I chose the object over text because the docs already said so (results.md: RIDs "over as the engine's own object"; record-wrappers.md: get_identity() is the RID object, "for a string RID use get_rid() or str(...)") and because the JVM wheel has more users whose code calls getBucketId() or passes the value straight back as a parameter. One thing is deliberately not part of the contract: rid == "#10:5" is False on the JVM wheel and True on the native wheel, so the docs say to compare str(rid).

Also fixed in the docs: lookup_by_rid is documented as taking an RID string, and it also takes the RID object a row holds (a docstring and database.md line, no code change). get_rid() now documents which rows have an identity (a record row, expand(), a projection of @rid without an alias).

The native side is a separate PR into native-preview (the native RID gets the missing methods and ordering, and Result.get_rid() takes a projected @rid), with the same test file and the same docs.

Local checks, all on this branch's last commit: tests/test_record_id_values.py 12 passed on the JVM wheel (new, shared with the native wheel); test_core.py, test_resultset.py, test_graph_api.py, test_docs_examples.py 91 passed (103 with the new file); pre-commit hooks (black, isort, whitespace, A/B tables) passed. Not run: the full suite and CI.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tae898 and others added 2 commits October 25, 2026 17:34
@tae898 @claude
Record ids in rows: pin the contract that both wheels share (P-02)
c72dc65
A record id inside a row (SELECT @Rid, a LINK property, a list of links) is an RID object on both wheels: str() is the text, equal RIDs hash alike, RIDs sort by bucket and position, getBucketId/getPosition/toString/isValid work, and an RID goes back in as a query parameter and to lookup_by_rid. get_rid() is text. The JVM wheel already behaves this way (its RID is the engine's own); the test file runs on both wheels and the docs state the contract and the one thing not to rely on (rid == "#10:5" is False on the JVM wheel).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tae898 @claude
Test: bind the edge target as a parameter instead of formatting it in…
1822d16
…to the statement

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tae898 tae898 mentioned this pull request Oct 25, 2026
Record ids in rows: tests and docs for the RID contract ArcadeData/arcadedb-python#49
Merged
@tae898
tae898 marked this pull request as ready for review October 25, 2026 08:54
This was referenced Oct 25, 2026
Bindings: more positional values than placeholders is a TypeError, not a silently dropped value (P-07) #536
Merged
Native: more positional values than placeholders is a TypeError, not a silently dropped value (P-07) #537
Closed
@tae898
tae898 merged commit ad5997d into main Oct 25, 2026
50 of 52 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@tae898
tae898 deleted the parity/record-id-values-jvm branch October 25, 2026 10:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@tae898
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.