-
Notifications
You must be signed in to change notification settings - Fork 0
DOPE-180: seperation between collection and scope #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/dope-185-extract-couchbase-module-from-core
Are you sure you want to change the base?
DOPE-180: seperation between collection and scope #86
Conversation
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| is IField<*> -> { | ||
| CouchbaseDopeQuery( | ||
| queryString = formatPathToQueryString(typeExpression.name, typeExpression.path), | ||
| ) | ||
| val ks = typeExpression.keySpace | ||
| val fieldQuery = when (ks) { | ||
| is AliasedKeySpace -> "${formatKeyspace(ks.alias)}.`${typeExpression.name}`" | ||
|
|
||
| is UnaliasedKeySpace -> { | ||
| val path = when { | ||
| ks.collection != null -> ks.collection | ||
| ks.scope != null -> ks.scope | ||
| else -> ks.bucket | ||
| } | ||
| "`$path`.`${typeExpression.name}`" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Construct field path with full keyspace
When rendering an IField for an unaliased keyspace, the resolver now selects only one of collection, scope, or bucket to prefix the field. A keyspace like bucket.scope.collection is therefore emitted as collection`.`field instead of ``bucket.scope`.`collection`.`field` (and scope only paths drop the bucket entirely), which will make unaliased queries against scoped collections fail. Building the path with all non‑null components (e.g. `formatKeyspace(ks.bucket, ks.scope, ks.collection)`) would preserve the full keyspace.
Useful? React with 👍 / 👎.
No description provided.