The loader reads the file contents as a string and considers it to be an SQL statment that will update the database(e.g starts with INSERT, UPDATE or DELETE). The SQL statement is used to construct a new function that will execute the update as required.
The function that is returned after successfully autoloading the file requires at least one argument. That first argument must be a database connection, as returned by the jdbcconn loader. Any subsequent arguments are assumed to be parameters to the SQL update and may be of any valid type(integer, string, date, etc).
The format of an sql file is simply any valid SQL statement that will update the database(e.g. starts with INSERT, UPDATE or DELETE). The statement must be valid for your particular database. As the SQL is executed as a prepared statement, you can specify variable parameters to the update by using a "?" character.
UPDATE
site_text
SET
text = ?
WHERE
site_id = 'lemeridien'
AND
language = 'japanese'
OR
property_id = ?
localhost.jdbcconn
sql file in your inventory, containing the
SQL update for your database. Any variable parameters you want can be
specified as "?". This example will assume you have created a file
called site_text.update.sql.
UPDATE
site_text
SET
text = ?
WHERE
site_id = 'lemeridien'
AND
language = 'japanese'
OR
property_id = ?
images( localhost, "My paragraph of text. Whatever.", "p12345" );
UPDATE
site_text
SET
text = 'My paragraph of text. Whatever.'
WHERE
site_id = 'lemeridien'
AND
language = 'japanese'
OR
property_id = 'p12345'