-
Notifications
You must be signed in to change notification settings - Fork 9
Draft: Feat-multiVal #71
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
Conversation
Sweep: PR ReviewAuthor: lveillard
|
| fn?: (value: unknown) => boolean; |
View Diff
Potential Issues
Sweep is unsure if these are issues, but they might be worth checking out.
src/stateMachine/query/tql/parse.ts
- The code does not handle the case where
multiValKeydoes not exist or is not an array, which could cause errors.
blitz-orm/src/stateMachine/query/tql/parse.ts
Lines 97 to 101 in 8756d10
| multiValKeys.forEach((multiValKey) => { | |
| const multiValKeyWithout$multiVal = multiValKey.replace(/\.\$multiVal$/, ''); | |
| const realValue = obj[multiValKey][0][multiValKeyWithout$multiVal].attribute; //there is an easier way for sure | |
| // eslint-disable-next-line no-param-reassign | |
| obj[dataFieldsKey][multiValKeyWithout$multiVal] = realValue; |
View Diff
Details
tests/typedb/mocks/schema.tql
- The removal and reintroduction of
ColorΒ·nameandColorΒ·valueattributes might affect existing queries or operations that rely on these attributes being defined at the top level.
blitz-orm/tests/typedb/mocks/schema.tql
Lines 13 to 15 in 8756d10
| # User | |
| UserΒ·email sub email; |
View Diff
Summary
This pull request introduced support for MultiValues queries and updated the testing framework to conditionally ignore certain todos based on the database being tested.
The main feature was implemented in src/stateMachine/query/tql/build.ts by adding logic to handle fields with a contentType of 'FLEX'. The processDataFields function was updated to identify these fields and generate the necessary query lines to fetch their attributes.
In src/stateMachine/query/tql/parse.ts, the parseFields function was modified to process and replace multi-value keys in the object, ensuring that the correct values are assigned.
A new type MultiField was added to src/types/schema/fields.ts, allowing fields with flexible content types to be defined and validated. This type was also included in the AllDataField union type to enhance versatility.
The tests/mocks/schema.ts and tests/surrealdb/mocks/schema.surql files were updated to include a new freeForAll field with a FLEX content type in the Color entity, and corresponding data entries were added in tests/surrealdb/mocks/data.surql.
Several test cases were added and updated in tests/unit/queries/query.ts to verify the functionality of MultiValues queries, including tests for querying and filtering by multi-value fields.
Minor changes included reformatting code for readability and updating test descriptions to include {TS} tags for categorization.
The following files were not reviewed because our filter identified them as typically non-human-readable (auto-generated) or less important files (e.g., dist files, package.json, images). If this is an error, please let us know.
- .husky/pre-commit
- package.json
|
Sorry, I don't know how to help with that. If you tag me (@ellipsis-dev) in a comment, I can do one of these things (but not multiple at once):
|
|
@ellipsis-dev, can you review and summarize this pull request |
|
OK! Reviewing this PR... Responding to this comment by @lveillard. For more information about Ellipsis, check the documentation. |
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.
π Looks good to me! Reviewed everything up to 8756d10 in 1 minute and 29 seconds
More details
- Looked at
673lines of code in21files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. tests/unit/schema/define.ts:5
- Draft comment:
This test case is marked as TODO but lacks any assertions or meaningful test logic. Consider implementing the test or removing it if it's not necessary. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_jalN8pDZmvLctGc9
You can customize Ellipsis with π / π feedback, review rules, user-specific overrides, quiet mode, and more.
β 5 days left in your free trial, upgrade for $20/seat/month or contact us.
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.
π Looks good to me! Reviewed everything up to 8756d10 in 1 minute and 40 seconds
More details
- Looked at
673lines of code in21files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. tests/unit/schema/define.ts:5
- Draft comment:
This test case is marked as TODO and lacks implementation. Please either implement the test logic or remove the placeholder if it's not needed. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_fqPWa7tuyQEWTqXY
You can customize Ellipsis with π / π feedback, review rules, user-specific overrides, quiet mode, and more.
β 5 days left in your free trial, upgrade for $20/seat/month or contact us.
|
@ellipsis-dev summarize this PR |
|
OK! Reviewing this PR... Responding to this comment by @lveillard. For more information about Ellipsis, check the documentation. |
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.
π Looks good to me! Incremental review on fa7e1b6 in 2 minutes and 28 seconds
More details
- Looked at
108lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0drafted comments based on config settings.
Workflow ID: wflow_ysbYh4pxYbjIcSBa
You can customize Ellipsis with π / π feedback, review rules, user-specific overrides, quiet mode, and more.
β 4 days left in your free trial, upgrade for $20/seat/month or contact us.
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.
π Looks good to me! Incremental review on 251b359 in 43 seconds
More details
- Looked at
15lines of code in1files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. changelog.md:8
- Draft comment:
The indentation for the bullet points under 'Feat' in version 0.10.14 is inconsistent. Please correct the indentation to maintain uniformity and improve readability. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_GoLZEAcDDD9mFgWi
You can customize Ellipsis with π / π feedback, review rules, user-specific overrides, quiet mode, and more.
β 4 days left in your free trial, upgrade for $20/seat/month or contact us.
|
@ellipsis-dev this PR introduced a bug: Where in this PR we introduced a .thing that might fail? |
Summary:
This PR introduces multi-value field handling in queries for TypeDB and SurrealDB, with comprehensive updates across scripts, configurations, and tests.
Key points:
Generated with β€οΈ by ellipsis.dev