New! The Potato Stock Exchange is open. Get in early! New! Try the new dashboard!

#sql

SQL Query

Bot staff only

Run a simple SQL query directly from chat

Usage

#sql <query>

<angle brackets> are required [square brackets] are optional flags change what it does

Arguments

  • query Required Text, the rest of the message

    The SQL query to run, or the redis command and its parameters

Flags 3

  • -unwrap Switch Bot developers only

    Do not invoke a transaction block on a query if truthy

    #sql -unwrap <query>
  • -print Switch Bot developers only

    Print the output of the query to a file if truthy

    #sql -print <query>
  • -rollback Switch Bot developers only

    Rollback the transaction if truthy

    #sql -rollback <query>

Examples 2

Run a SQL query

InvigoratingTaco612:#sql SELECT COUNT(*) FROM users
PotatBotat:[SELECT - 1 rows in 2.31 ms] {"count":"4521"}

Run a query that matches nothing

RizzingDonut:#sql SELECT * FROM users WHERE username = 'nobody'
PotatBotat:[SELECT in 0.84 ms] Query returned no rows.