SQL Worker Objects – What are they?
The majority of DAMs in Omnis Studio 6.0 will contain additional ‘statement worker’ objects. You will be able to create a SQL Worker Object by sub-classing an Omnis Object class with your chosen statement worker. You will then be able to use the worker object to execute long-running SQL queries (like SELECT statements) as background tasks. This will leave your Omnis application free to continue. More importantly, it will leave your GUI free so the application can remain responsive. What’s more, you will be able to create multiple SQL worker objects if required and assign each one a separate worker task.
What are they not?
You will not be able to simply replace your existing DAM session objects with worker objects. This is because worker objects operate asynchronously. Unlike $fetch() when using a DAM statement object, you will not get your results back straight away. Instead, when the worker’s background task completes, it ‘calls back’ into your object with a list containing the result set. You can then add code to the call back method that will populate your list fields on-the-fly.
Want to know more?
If you are a member of the Omnis Developer Partner Program (ODPP) and you want to try out the new SQL Worker Objects for yourself, along with all the other features in Omnis Studio 6.0 (summarized here in the blog), you can request to join the Beta program on TigerLogic’s website.
Posted by: Gary Ashford