PlugIns JdbcSlim UserGuide 4TheMappingBetweenTestDataAndCommands
The SQL Commands Insert, Update and Delete return no normal output.
Instead they return the number of rows inserted, updated or deleted in a column called: Count
SQLCommand | TestDatabase | insert into TestData values (DEFAULT, '%Name%', '%Phone%', '%City%', '%Profession%') | dbgetgeneratedkeys | ||
SCOPE_IDENTITY()? | City | Name | Phone | Profession | Count? |
$ID1= | Berlin | Boby | 12345 | Doctor | 1 |
$ID2= | Denver | Bob | 6789 | Artist | 1 |
$ID3= | Sydney | Bob | 6789 | Artist | 1 |
SQLCommand | TestDatabase | update TestData set City='%NewCITY%' where ID ='%ID%' |
ID | NewCITY | Count? |
$ID1 | HongKong | 1 |
$ID2 | Tokyo | 1 |
By defining the property DbUpdateCount a different column name can be defined.
Define Properties | UpdateDatabase |
key | value |
.include | TestDatabase |
DbUpdateCount | HowManyUpdates |
SQLCommand | UpdateDatabase | update TestData set City='%NewCITY%' where NAME like'%Name%' |
Name | NewCITY | HowManyUpdates? |
Bob% | HongKong | 3 |
SQLCommand | TestDatabase | delete TestData where ID >='%ID%' |
ID | Count? | |
$ID1 | 3 | |
$ID2 | 0 |
Contents:
- Command Chain +-
- Select Update Select +- : Not working with H2 maybe other jdbcDriver support this