Skip to content
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

Refactor critical Resql queries #483

Open
27 tasks
turnerrainer opened this issue Apr 16, 2024 · 1 comment
Open
27 tasks

Refactor critical Resql queries #483

turnerrainer opened this issue Apr 16, 2024 · 1 comment
Assignees

Comments

@turnerrainer
Copy link
Contributor

turnerrainer commented Apr 16, 2024

AS AN Architect
I WANT some of Bürokratt's current critical Resql queries to be refactored
SO THAT they wouldn't crash the system

Acceptance Criteria

  • No JOIN queries can be used in SQL queries
  • No UPDATE queries can be used in SQL queries
  • No DELETE queries can be used in SQL queries
  • Only INSERT and SELECT queries can be used in SQL queries
  • Only denormalized databases can be used
  • Must specify requested selectors, SELECT * is not allowed
  • Every request must contain LIMIT from, to when listing results
  • Reduce JOIN queries to minimum
  • Database schema changes are out of scope of this issue

Scope of work

Chatbot
Analytics Module

Training Module

Service Module

@turnerrainer turnerrainer converted this from a draft issue Apr 16, 2024
@turnerrainer turnerrainer added this to the Chatbot 2.0.0 code freeze milestone May 8, 2024
@turnerrainer turnerrainer moved this from To Groom to In Progress in Bürokratt Sprint May 8, 2024
@1AhmedYasser
Copy link
Collaborator

1AhmedYasser commented May 8, 2024

@turnerrainer @baha-a

Most Critical Queries:

Chatbot Module

  1. get-cs-all-active-chats.sql
  2. get-cs-all-ended-chats.sql
  3. get-cs-all-pending-chats.sql
  4. get-cs-all-unavailable-ended-chats.sql

Analytics Module

  1. csa-chat-forwards.sql
  2. feedback-chats-with-negative-feedback.sql

Notes:

  1. Check for any select * and refactor it to use select {field_name}
  2. The service module has some queries that use update and delete, we need to make sure only insert and select are used.

This was referenced May 10, 2024
@rasmusei rasmusei moved this from In Progress to In Review in Bürokratt Sprint May 16, 2024
@rasmusei rasmusei assigned 1AhmedYasser and unassigned baha-a May 16, 2024
@turnerrainer turnerrainer moved this from In Review to To Deploy in Bürokratt Sprint Jun 3, 2024
@turnerrainer turnerrainer moved this from To Deploy to Acceptance Testing in Bürokratt Sprint Jun 18, 2024
@varmoh varmoh moved this from Acceptance Testing to Done in Bürokratt Sprint Aug 13, 2024
@rasmusei rasmusei removed this from the Chatbot 2.0.0 code freeze milestone Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants