Inconsistent naming in bubble?

Im still trying to wrap my head around bubble’s OO design, which seems confusing to me at least haha.

For example, I made a SQL query with the “name” sql_get_image. It returns a single value, with a bubble type of image. Is that a data type sql_get_image with a single field (of no name) of type image?

In order to fit in the rest of bubble, it would make sense that it would act like a “native” data type. Let’s find out!

Can a group’s “type of content” as sql_get_image? I sure can!

Can I set a page’s “type of content” as sql_get_image ? Nope!

Why? Is there sort of a reference of object types in bubble, and what entries in the form needs what sort of types?

Here’s what Im trying to do:

  • Parse two url parameters
  • Use those as parameters to my sql query
  • The results of that query is one record that has a bunch of different columns / fields.
  • Those fields are used to populate a bunch of things on the page.

What’s the best way of organizing this? Should I make a new data type in bubble, even if I am not using the built in database? Would love a good reference for this!

I think you are encountering a fundamental problem with Bubble API/connections and data types. You actually need two API calls, one that is specified as an action and one that is specified as a data (even though they are they exact same call and return the exact same data).

The next problem you’ll run into is that you can’t use these interchangeably. In my opinion this is one of the biggest problems with Bubble presently. If you could define data types apart from API calls it would provide a very much needed and necessary improvement.

For now, you have to find ways to work around this limitation.

Yeah I dont really understand the difference between data and action? I mean, its a database…