CRUD operations from Ignition

I know we have tools like named queries for DB CRUD operations.
I wanted to know if there are other options for DB heavy application.
What is the best approach in Ignition when the application has large demands CRUD operations on various tables?

If it is going to be arbitrary tables, then you will likely be dynamically creating SQL for use with system.db.runPrepQuery() and system.db.runPrepUpdate(), where schema/table/column identifiers are explicit and other data is parameterized via ? placeholders.

There's nothing more built-in to help you do this. You should browse the Ignition Exchange for similar tasks that you could customize.

1 Like

I work on a team that builds a very database-intensive application, where Ignition is just the interface - a lot of the underlying logic happens in stored procedures. We use Named Queries for everything that closely mirror the database schemas and tables we have, that way it's easy to find the Named Queries that reference certain stored procedures easily. I believe this approach makes sense since we use stored procedures heavily - if you don't, maybe Named Queries won't be as beneficial (IA recommends you use them still, though).

The benefit of doing it this way is that if your DB schema changes in any way, you change one Named Query (if you even need to - sometimes all the changes happen in the stored procedure, which doesn't require updating anything on the Ignition side!) and then the new query is available for use everywhere. That being said, it's not difficult to do a search for your query and update it that way as well, if you're using prepared statements.