|
Conceptually the Database Automator Action Pack is a small collection of Auotmator
actions to provide access to information stored in a relational database management
system like PostgreSQL, Microsoft SQL Server or MySQL. The collection offers two
methods, ODBC using ODBC Query action or direct to PostgreSQL using PG Query action.
Both of these actions return an array of dictionary items that can easily be worked
with using an AppleSCript action using simple syntax.
For example, a query of 'select stateCode, stateName, countryCode from allStates'
would return an array of dictionaries containing the stateCode, stateName and
countryCode. In an AppleScript stage any member could be accessed using AppleScript's
normal syntax:
on run {input, parameters}
set output to {}
repeat with anItem in input
set output to output & stateCode of anItem
end repeat
return output
end run
This syntax would convert that recordset into an array of stateCodes, for use in
the next action.
There is also the capability to build queries in script actions, or load queries
from disk to be run by the dynamic query actions, to provide dynamic behaviors in
a workflow. Finally, there are also a couple of utility actions to take the
recordsets and perform some basic needs, including Export to XML, Export to
Delimited File, and Export as Web Page.
Using the pieces provided as part of this action pack, it is possible to do
a massive amount of process automation in a more user friendly tool, including
building simple HTML reports that could be published daily to a web site all by
a non-programmer. The potential uses are limited only by imagination.
This product is in development and should be available shortly after the
new year arrives.
|