Skip to content

Commit e1b7b43

Browse files
Updated example block for Execute Sql String Sanstran.
1 parent cda16a8 commit e1b7b43

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/DatabaseLibrary/query.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,12 @@ def execute_sql_string_sanstran(self, sqlString):
277277
SQL commands are expected to be delimited by a semi-colon (';').
278278
279279
For example:
280-
| Execute Sql String Sanstran | DELETE FROM person_employee_table; DELETE FROM person_table |
281-
282-
For example with an argument:
283-
| Execute Sql String Sanstran | SELECT * FROM person WHERE first_name = ${FIRSTNAME} |
280+
| Check If Exists In Database SELECT * FROM dbo.ExampleTable WHERE Id = 1 AND ExampleFlag = 0
281+
| Execute Sql String Sanstran BEGIN TRAN
282+
| Execute Sql String Sanstran UPDATE dbo.ExampleTable SET ExampleFlag = 1 WHERE Id = 1 AND ExampleFlag = 0
283+
| Check If Exists In Database SELECT * FROM dbo.ExampleTable WHERE Id = 1 AND ExampleFlag = 1
284+
| Execute Sql String Sanstran ROLLBACK TRAN
285+
| Check If Exists In Database SELECT * FROM dbo.ExampleTable WHERE Id = 1 AND ExampleFlag = 0
284286
"""
285287
cur = self._dbconnection.cursor()
286288
logger.info('Executing : Execute SQL String Sanstran | %s ' % (sqlString))

0 commit comments

Comments
 (0)