Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Move certain settings stored in DB to JSON string saved in LONGTEXT #21

@cineafx

Description

@cineafx

This would allow for not needing stuff like this:

let results = await sqlPool.query(`
  SELECT botID, channelID, SUB, SUB_T2, SUB_T3, SUB_PRIME, RESUB, RESUB_T2, RESUB_T3, RESUB_PRIME, SUBGIFT, ANONSUBGIFT, SUBMYSTERGIFT, GIFTPAIDUPGRADE, ANONGIFTPAIDUPGRADE, REWARDGIFT, RAID, RITUAL
  FROM notifications
  WHERE botID = ?;
`, botID)
// ...

but instead something like this:

let results = await sqlPool.query(`
  SELECT botID, channelID, data
  FROM notifications
  WHERE botID = ?;
`, botID)
// ...
return results.map((line) => {line.data = JSON.parse(line.data)})

Metadata

Metadata

Assignees

No one assigned

    Labels

    botissues related to the twitch bot partenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions