buerokratt / Buerokratt-Chatbot

1 stars 18 forks source link

Refactor critical Resql queries #483

Open turnerrainer opened 5 months ago

turnerrainer commented 5 months ago

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

Scope of work

Chatbot
Analytics Module

Training Module

Service Module

1AhmedYasser commented 4 months ago

@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.