-
Notifications
You must be signed in to change notification settings - Fork 75
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
refac: Migrate all datasets db operation to drizzle on NextJs #197
refac: Migrate all datasets db operation to drizzle on NextJs #197
Conversation
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. Let's test and remove the relevant app-server code before we can merge this
hey @dinmukhamedm just wanna confirm before I delete this, this response |
btw just info that the POST method for updating a dataset in |
Yes, this is for consistency with get evaluations and get traces where we used it to show a page placeholder if there are none. However, this is already done separately in the frontend. We can remove this, this is safe.
Great catch! Let's keep it for now. Later we may want to move that request to the frontend too, but it's gRPC, so it is a little bit more work
yep, saw that, we can delete that. |
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 fadd191 in 29 seconds
More details
- Looked at
433
lines of code in7
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/app/api/projects/[projectId]/datasets/[datasetId]/route.ts:22
- Draft comment:
The DELETE method is still using the fetcher utility to make a DELETE request to the backend. Consider refactoring this to use Drizzle ORM directly for database operations, similar to the GET method. - Reason this comment was not posted:
Comment was on unchanged code.
2. frontend/app/api/projects/[projectId]/datasets/route.ts:56
- Draft comment:
The DELETE method is still using the fetcher utility to make a DELETE request to the backend. Consider refactoring this to use Drizzle ORM directly for database operations, similar to the GET method. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_htFESdgvi96DeWwt
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
Thanks a ton!
closed #82
Important
Migrated dataset database operations from SQLx to Drizzle ORM in both backend and frontend, updating routes and pages accordingly.
create_dataset
,get_datasets
,count_datasets
, andrename_dataset
fromdatasets.rs
.routes/datasets.rs
.main.rs
to remove unused dataset routes.fetcher
calls with Drizzle ORM queries inroute.ts
for dataset operations.page.tsx
to use Drizzle ORM for dataset retrieval.This description was created by for fadd191. It will automatically update as commits are pushed.