refactor: Remove exposing schema() for NeugDBSession#569
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors schema access to stop exposing schema() on NeugDBSession, instead obtaining schema via transactions (and adds ReadTransaction::schema() to support read-mode execution).
Changes:
- Removed
NeugDBSession::schema()from the public API and updated server execution to passtxn.schema()into pipeline execution. - Added
ReadTransaction::schema()to support schema access during read transactions. - Updated transaction tests to fetch label IDs via
txn.schema()rather than via session/db schema accessors.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/transaction/test_acid.cc | Updates tests to use txn.schema() for label/edge IDs; adjusts init flows accordingly. |
| src/transaction/read_transaction.cc | Implements ReadTransaction::schema() for read-mode schema retrieval. |
| src/server/neug_db_session.cc | Switches query execution to use per-transaction schema access; removes reliance on session schema. |
| include/neug/transaction/read_transaction.h | Exposes ReadTransaction::schema() in the public header. |
| include/neug/server/neug_db_session.h | Removes schema() from NeugDBSession interface and drops Schema fwd declaration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
liulx20
previously approved these changes
Jun 22, 2026
5476f65 to
f18ef92
Compare
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.
Fix #567