?? updatableresultset.out
字號:
column 1 on this row is e1update row should fail because cascade constraint is update restrictSQL State : 23503Got expected exception UPDATE on table 'SELFREFERENCINGT2' caused a violation of foreign key constraint 'MANAGES2' for key (e1). The statement has been rolled back.Positive Test15 - With autocommit off, attempt to drop a table when there is an open updatable resultset on itOpened an updatable resultset. Now trying to drop that table through another StatementSQL State : X0X95Got expected exception Operation 'DROP TABLE' cannot be performed on object 'T1' because there is an open ResultSet dependent on that object.Since autocommit is off, the drop table exception will NOT result in a runtime rollback and hence updatable resultset object is still openPositive Test16a - Do deleteRow within a transaction and then rollback the transactionVerify that before delete trigger got fired, row count is 0 in deleteTriggerInsertIntoThisTable 1 - {0}Verify that before deleteRow, row count is 4 in table0WithTriggers 1 - {4}column 1 on this row is 1now try to delete row and make sure that trigger got firedVerify that delete trigger got fired by verifying the row count to be 1 in deleteTriggerInsertIntoThisTable 1 - {1}Verify that deleteRow in transaction, row count is 3 in table0WithTriggers 1 - {3}Verify that after rollback, row count is back to 0 in deleteTriggerInsertIntoThisTable 1 - {0}Verify that after rollback, row count is back to 4 in table0WithTriggers 1 - {4}Positive Test16b - Do updateRow within a transaction and then rollback the transactionVerify that before update trigger got fired, row count is 0 in updateTriggerInsertIntoThisTable 1 - {0}Look at the data in table0WithTriggers before trigger gets fired C1,C2 -- -- {1,1} {2,2} {3,3} {4,4}column 1 on this row is 1now try to update row and make sure that trigger got firedVerify that update trigger got fired by verifying the row count to be 1 in updateTriggerInsertIntoThisTable 1 - {1}Verify that new data in table0WithTriggers C1,C2 -- -- {123,1} {2,2} {3,3} {4,4}Verify that after rollback, row count is back to 0 in updateTriggerInsertIntoThisTable 1 - {0}Verify that after rollback, table0WithTriggers is back to its original contents C1,C2 -- -- {1,1} {2,2} {3,3} {4,4}Positive Test17 - After deleteRow, resultset is positioned before the next rowgetXXX right after deleteRow will fail because resultset is not positioned on a row, instead it is right before the next rowSQL State : 24000Got expected exception Invalid cursor state - no current row.Positive Test18 - Test cancelRowUpdates method as the first updatable ResultSet api on a read-only resultsetSQL State : XJ083Got expected exception 'cancelRowUpdates' not allowed because the ResultSet is not an updatable ResultSet. Positive Test19 - Test updateRow method as the first updatable ResultSet api on a read-only resultset Got expected exception : 'updateRow' not allowed because the ResultSet is not an updatable ResultSet. Positive Test20 - Test updateXXX methods as the first updatable ResultSet api on a read-only resultset Test updateShort on a readonly resultset Using column position as first parameter to updateShort Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateShort Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet. Test updateInt on a readonly resultset Using column position as first parameter to updateInt Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateInt Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet. Test updateLong on a readonly resultset Using column position as first parameter to updateLong Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateLong Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet. Test updateBigDecimal on a readonly resultset Using column position as first parameter to updateBigDecimal Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateBigDecimal Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet. Test updateFloat on a readonly resultset Using column position as first parameter to updateFloat Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateFloat Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet. Test updateDouble on a readonly resultset Using column position as first parameter to updateDouble Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateDouble Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet. Test updateString on a readonly resultset Using column position as first parameter to updateString Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateString Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet. Test updateAsciiStream on a readonly resultset Using column position as first parameter to updateAsciiStream Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateAsciiStream Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet. Test updateCharacterStream on a readonly resultset Using column position as first parameter to updateCharacterStream Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateCharacterStream Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet. Test updateByte on a readonly resultset Using column position as first parameter to updateByte Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateByte Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet. Test updateBytes on a readonly resultset Using column position as first parameter to updateBytes Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateBytes Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet. Test updateBinaryStream on a readonly resultset Using column position as first parameter to updateBinaryStream Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateBinaryStream Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet. Test updateClob on a readonly resultset Using column position as first parameter to updateClob Using column name as first parameter to updateClob Test updateDate on a readonly resultset Using column position as first parameter to updateDate Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateDate Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet. Test updateTime on a readonly resultset Using column position as first parameter to updateTime Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateTime Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet. Test updateTimestamp on a readonly resultset Using column position as first parameter to updateTimestamp Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateTimestamp Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet. Test updateBlob on a readonly resultset Using column position as first parameter to updateBlob Using column name as first parameter to updateBlob Test updateBoolean on a readonly resultset Using column position as first parameter to updateBoolean Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateBoolean Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet. Test updateNull on a readonly resultset Using column position as first parameter to updateNull Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet. Using column name as first parameter to updateNull Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet. Test updateArray on a readonly resultset Using column position as first parameter to updateArray Using column name as first parameter to updateArray Test updateRef on a readonly resultset Using column position as first parameter to updateRef Using column name as first parameter to updateRefPositive Test21 - Test all updateXXX(excluding updateObject) methods on all the supported sql datatypesNext datatype to test is SMALLINT Testing updateShort on SQL type SMALLINT Using column position as first parameter to updateShort Using column name as first parameter to updateShort Testing updateInt on SQL type SMALLINT Using column position as first parameter to updateInt Using column name as first parameter to updateInt Testing updateLong on SQL type SMALLINT Using column position as first parameter to updateLong Using column name as first parameter to updateLong Testing updateBigDecimal on SQL type SMALLINT Using column position as first parameter to updateBigDecimal Using column name as first parameter to updateBigDecimal Testing updateFloat on SQL type SMALLINT Using column position as first parameter to updateFloat Using column name as first parameter to updateFloat Testing updateDouble on SQL type SMALLINT Using column position as first parameter to updateDouble Using column name as first parameter to updateDouble Testing updateString on SQL type SMALLINT Using column position as first parameter to updateString Using column name as first parameter to updateString Testing updateAsciiStream on SQL type SMALLINT Using column position as first parameter to updateAsciiStream Got expected exception : An attempt was made to get a data value of type 'SMALLINT' from a data value of type 'java.io.InputStream'. Using column name as first parameter to updateAsciiStream Got expected exception : An attempt was made to get a data value of type 'SMALLINT' from a data value of type 'java.io.InputStream'. Testing updateCharacterStream on SQL type SMALLINT Using column position as first parameter to updateCharacterStream Got expected exception : An attempt was made to get a data value of type 'SMALLINT' from a data value of type 'java.io.Reader'. Using column name as first parameter to updateCharacterStream
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -