-
Notifications
You must be signed in to change notification settings - Fork 848
feat: mailbox #6980
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: main
Are you sure you want to change the base?
feat: mailbox #6980
Conversation
Signed-off-by: pyranota <[email protected]>
Deploying windmill with
|
| Latest commit: |
c82e972
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://846449d5.windmill.pages.dev |
| Branch Preview URL: | https://feat-mailbox.windmill.pages.dev |
Signed-off-by: pyranota <[email protected]>
Signed-off-by: pyranota <[email protected]>
Signed-off-by: pyranota <[email protected]>
|
/updatesqlx |
|
Claude finished @pyranota's task —— View job Code Review CompleteI've reviewed the mailbox feature implementation. Here's my comprehensive feedback: ✅ Strengths
|
|
Starting sqlx update... |
| MailboxMsg, | ||
| r#" | ||
| DELETE FROM mailbox | ||
| WHERE message_id = ( SELECT message_id ║ |
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.
Remove the stray '║' character in the SQL query and consider using 'IS NOT DISTINCT FROM' for mailbox_id (to correctly match NULL values). Also, add an ORDER BY (e.g., ORDER BY message_id ASC) in the subquery for deterministic behavior.
| WHERE message_id = ( SELECT message_id ║ | |
| WHERE message_id = ( SELECT message_id |
| self.mailbox_type as MailboxType, | ||
| self.mailbox_id.as_ref(), | ||
| ) | ||
| .fetch_all(e) |
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.
Use .execute() instead of .fetch_all() in the delete() method since the returned rows are not used.
| .fetch_all(e) | |
| .execute(e) |
| self.mailbox_type as MailboxType, | ||
| self.mailbox_id.as_ref(), | ||
| ) | ||
| .fetch_all(e) |
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.
Use .execute() instead of .fetch_all() in the delete_batch() method to improve performance by avoiding retrieval of result rows.
| .fetch_all(e) | |
| .execute(e) |
|
Successfully ran sqlx update |
| @@ -0,0 +1,46 @@ | |||
| { | |||
| "db_name": "PostgreSQL", | |||
| "query": "\n DELETE FROM mailbox \n WHERE message_id = ( SELECT message_id ║\n FROM mailbox \n WHERE type = $1 AND mailbox_id = $2 AND workspace_id = $3 \n LIMIT 1 \n ) \n RETURNING payload, created_at, message_id as id;\n ", | |||
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.
Remove stray non-ASCII character (‘║’) from the query.
| "query": "\n DELETE FROM mailbox \n WHERE message_id = ( SELECT message_id ║\n FROM mailbox \n WHERE type = $1 AND mailbox_id = $2 AND workspace_id = $3 \n LIMIT 1 \n ) \n RETURNING payload, created_at, message_id as id;\n ", | |
| "query": "\n DELETE FROM mailbox \n WHERE message_id = ( SELECT message_id \n FROM mailbox \n WHERE type = $1 AND mailbox_id = $2 AND workspace_id = $3 \n LIMIT 1 \n ) \n RETURNING payload, created_at, message_id as id;\n ", |
No description provided.