Skip to content
Back

sql script in appwrite ?

  • 0
  • Databases
  • General
1sma1l
20 Mar, 2024, 22:46

is it possible to execute an sql script to one of my collections in the appwrite db ?

TL;DR
Feature request for SQL script execution in Appwrite - not recommended due to performance issues. Access data through APIs provided instead. Consider maintaining running count in metadata collection for best results. If records don't change, use metadata collection. For similar results without using SQL, rely on Appwrite APIs.
Steven
20 Mar, 2024, 22:48

No, Appwrite is an abstraction on top of the underlying database and you access the data via the APIs provided

1sma1l
20 Mar, 2024, 22:51

then how can i get the same result as the script i sent without using sql ?

Steven
20 Mar, 2024, 22:56

There's a feature request for something like this so you should add a šŸ‘ to https://github.com/appwrite/appwrite/issues/5667.

Doing something like the query you shared is not advised because it will be slower and slower as the number of records in your table grows. If the records don't get updated, the best approach is to keep a running count in some metadata collection

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more