Runs a delete or update SQL statement against the database.
Sometimes putting an application into a required state means connecting
to a database and executing a SQL statment. This can be done with this tag.
The SQL can be an insert, delete or update command. The body of this element
should contain the SQL statement used. See the function tag docs for information
on other attributes supported and/or required by this tag.
An example might be:
<junit-session xmlns:j="jelly:core">
<sql-update
functionId="Insert another row into test table"
jdbcDriver="org.hsqldb.jdbcDriver"
jdbcUrl="jdbc:hsqldb:tst/_tmp/jameleon_test2"
jdbcUsername="sa"
jdbcPassword="">
create cached table test2(
test_str varchar,
test_str2 varchar
);
</sql-update>
<sql-update
functionId="Delete row from test table"
jdbcDriver="org.hsqldb.jdbcDriver"
jdbcUrl="jdbc:hsqldb:tst/_tmp/jameleon_test2"
jdbcUsername="sa"
jdbcPassword="">
delete from test2 where test_str='some text';
-- some SQL comment
-- Another SQL comment
</sql-update>
</junit-session>
Tag Name: <sql-update>Type: action Steps:
Connect to the database for the the correct environment
execute the provided sql statement.
Field Summary
Fields inherited from class net.sf.jameleon.sql.AbstractSqlTag