Repository navigation
C++: DataProvider::GetAssignmentFull is back (#94) - #126
Merged
Merged
Conversation
GetAssignmentFull(run, path, variation="default", timeMicro=0) resolves as GetAssignmentShortMicro (the variation chain and the time limit included) and loads the rest of the assignment: its run range (min, max, name), the variation the data came from, its comment, and its creation and modification times. GetAssignmentFullByTag(run, path, tag) does the same with a tag's variation and time. The providers implement a protected LoadAssignmentDetails (one query by assignment id on SQLite and MySQL); the base class default loads nothing, so a provider written for 2.4 still compiles. Assignment owns a run range the provider created for it (SetRunRange(rr, true)). Tests: the MySQL test that issue #94 left commented out is real again, and SQLite has the same case: the data, run range, variation, comment and time of /test/test_vars/test_table:100, the fallback from a variation without data to its parent, a variation's own data. C++ suite: SQLite 55 cases / 908 assertions (v2-main 54 / 888 on this machine), MySQL 8.3 and MariaDB 10.5 65 / 1204 each. docs/apis/cpp.md has an example. Closes #94 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
GetAssignmentFull(run, path, variation="default", timeMicro=0)resolves asGetAssignmentShortMicro(variation chain and time limit included) and loads the rest: run range (min, max, name), the variation the data came from, comment, creation and modification times.GetAssignmentFullByTag(run, path, tag)uses a tag's variation and time.LoadAssignmentDetails(one query by assignment id). The base default loads nothing, so a provider written for 2.4 still compiles.Assignmentowns a run range the provider created (SetRunRange(rr, true)), so no leak.Tests: the MySQL case #94 left commented out is real again; SQLite gets the same case (data, run range, variation, comment, time; fallback to the parent variation; a variation's own data). C++ suite: SQLite 55 cases / 908 assertions (v2-main 54 / 888 on the same machine), MySQL 8.3 and MariaDB 10.5 65 / 1204 each. Example in docs/apis/cpp.md.
Closes #94
🤖 Generated with Claude Code