6
Expose API method/interface to execute raw SQL Query
Source: supabase/supabase#11797 · opened by @kevinschaich
Forgive me if I've missed it in the docs, but I think we need to expose a way to write raw SQL via client APIs (to allow access to Postgres functions). Pretty much all database ORMs expose a method to execute a raw SQL Query [(e.g. Prisma)]( While it is currently possible to execute Postgres functions via let { data, error } = await supabase.rpc(...), it becomes impractical at scale and when functions are required within most queries (e.g. when using even out-of-the-box Supabase extensions like Postgis). For example, I'm using the Postgis extension and the [Finding all data points within a bounding box]( example has been extremely useful. But I have over 100+ geospatial tables that I need to query from my client, which means creating 100+ versions of this function in the currently clunky interface for table_A, table_B, etc. A simplified example of the problem: If we had a client-side function which exposes a sql interface, the generalized version which works wit…
No pledges yet. Be the first to back this.
Comments
Similar requests
Seed folder instead of / in addition to seed.sql file (backwards compatible)
2 votes · 0 comments
Enhancing Developer Experience with Client-side Raw SQL Queries
3 votes · 0 comments
Provide API Endpoint for Natural Language to SQL Query Execution for Frontend Developers
1 vote · 0 comments
[studio] Support multiple results in SQL Editor
2 votes · 0 comments
Enhanced SQL Query Management for Supabase CLI: A Proposal for Query File and Folder Support
4 votes · 0 comments
No comments yet.