SQL question about how Bubble make queries

Hey,
Bubble fam. Does Bubble always make SQL queries like this “Select all from table x”? Even for a RG with only one field?

Cheers
Meinolf

Yes, it doesn’t make partial queries, it’s always the equivalent of ‘select * from <>’. The only exception is when you’re using :grouped by where it only returns the grouped fields and the aggregated values eg sum, count etc.

1 Like

This actually isn’t true. If you use privacy rules the data is only returned for the fields you select. So in that sense it definitely isn’t “always” the equivalent of “select *”.

Yep, otherwise privacy rules wouldn’t make any sense.
But in most cases it is “select *”

the closest thing we have to real data about this is inspecting the HTTP requests on a page

we know that the cluser uses elasticsearch, from inspecting the HTTP traffic so that gives us some information on what tech is being used

you can see the entire response for the search, even if you use only one field in the repeating group - and we can see it is returning all the data for that record to the client (while respecting privacy rules)

How can privacy rules are respecting if we can see those fields in the inspector? :scream:

Something that isn’t talked about too much in Bubble is how the database schema (table names, column names, column types) is public information. Privacy Rules only protect the data.

@lindsay_knowcode I don’t think so if you have privacy rules set up and only show 2 columns instead of all the columns. Bubble API will not fetch the hidden column as the key, if you are calling “DO search for”

@ankur1 in this particular instance @lindsay_knowcode is correct.

1 Like

I am trying to send you a private message, but can’t see homw? I saw your youtube channel

Not entirely true.

image

/meta will now only show you basic app data.

And even with the data api enabled, you only get ticked data endpoints not everything.

I have rooted out table schema of apps from places other than Swagger documentation before… i.e. with that checkbox ticked the schema can still be scraped from elsewhere, I believe that to be the case anyhow

Agreed. I thought it did provide everything. But now I am not so sure it does. Maybe it was a quiet update.

You can intercept calls in your Browser, but that doesn’t give you the whole schema.

Although in this case, it just means that the Bubble database USED to be on Elastic, but now isn’t. And they are using the old endpoints to avoid migrating everything in the front end.

1 Like