#AstroDB direct queries
1 messages · Page 1 of 1 (latest)
Hey wyli! That's a good question. We don't have a documented way to query our URL directly. What are you trying to do with it?
i want my users to also be authorize with discord easily (without having to go through the troubles of discord app integrations) so it would be like a discord bot makes a request to the database for a specific discord token for each account and verifies it against the one the username and the one they provided to verify them
if you would like i could document it later after playing around with it
Fair enough! You can query Astro DB over HTTP, so you can use this template to structure your request https://github.com/withastro/astro/blob/main/packages/db/src/runtime/db-client.ts#L47-L57
To clarify, sql is the raw SQL string and args are a positional array of arguments to serialize into the query, if applicable
Now big warning: don't send create or delete table statements! These can get your tables out-of-sync with our Astro DB config, which causes some unwanted results in the Studio dashboard