refactor: drop compound databaseId:tableId resourceId#176
Open
abnegate wants to merge 7 commits into
Open
Conversation
Contributor
Greptile SummaryThis PR replaces compound database/table selectors with explicit root and child selector handling. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (6): Last reviewed commit: "fix: preserve exact adapter constructor ..." | Re-trigger Greptile |
The CSV/JSON sources and destinations took a single composite
"databaseId:tableId" string and split it on ':' internally. The Appwrite
source did the same trick on `rootResourceId` to scope a transfer to a
specific collection within a database. That mixed two identifiers in
one slot, broke queryability for callers, and forced consumers to
recompose the colon-form at the boundary.
This change replaces the compound with explicit fields:
- CSV/JSON Source/Destination constructors now take `string $databaseId,
string $tableId` directly. No more `explode(':', $resourceId)`.
- Target/Source/Destination/Transfer::run gain a new optional
`$rootResourceChildId` parameter that, for database roots, scopes the
transfer to a specific table/collection inside the root database.
`$rootResourceId` keeps its existing semantics — it always matches
`$rootResourceType` (a top-level resource).
- Sources/Appwrite no longer inspects `rootResourceId` for ':' or
splits it; it reads `$this->rootResourceChildId` when the caller wants
per-collection filtering.
Tests updated to call the new constructor signatures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The abstract Target::run() omitted $rootResourceType, so its 4th positional parameter was $rootResourceChildId while both concrete overrides (Source::run, Destination::run) take $rootResourceType there. Callers typed against Target passing four positional args would silently route the child ID into the resource type. All three signatures now match exactly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
abnegate
force-pushed
the
feat/drop-compound-resource-id
branch
from
July 17, 2026 10:18
183f0e2 to
4abc29b
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.
Summary
Target,Source,Destination, andTransfer::run()contracts while addingrunWithResourceSelector()as the explicit database-and-child selector path.fromResourceIds()factories for separate database and table IDs.databaseId:tableIdselectors working and treats IDs passed through the new APIs as opaque, including IDs containing colons.Test plan
composer formatcomposer lintcomposer checkpg_walinitialization withNo space left on deviceafter scoped stack/cache cleanup)Run Test Suiteon exact head7ed62ca2e2279bf30fa2018655e045c59bb5bc3dLinked