Hi all,
Started working with Custom Queries today.
I’d like to know if it’s possible, and if it is the correct syntax to input a parameter into the schema I am inputting into a JSONB column in postgres.
Example input query:
INSERT INTO cars(cars_info)
VALUES('{"brand": "Toyota", "color": ["red", "black"], "price": 285000, "sold": true}');
Ideally, what I would want to be able to do is replace ‘Toyota’ with :P1
and the expression will come from a previous step.
So far, I’ve tried:
INSERT INTO cars(cars_info)
VALUES('{"brand": ":P1", "color": ["red", "black"], "price": 285000, "sold": true}');
and
INSERT INTO cars(cars_info)
VALUES('{"brand": "(:P1)", "color": ["red", "black"], "price": 285000, "sold": true}');
But the value being entered into the db is :p1 so I’m wondering if this is even possible with Wappler and if I’m just doing it incorrectly, currently…
Community Page
Last updated:
Last updated: