-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle query params as tuples, not as lists - fix #211
- Loading branch information
Showing
2 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
import inspect | ||
import re | ||
import sys | ||
from typing import List, Optional | ||
from typing import List, Optional, Tuple | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
amochin
Author
Collaborator
|
||
|
||
from robot.api import logger | ||
|
||
|
@@ -31,7 +31,7 @@ def query( | |
sansTran: bool = False, | ||
returnAsDict: bool = False, | ||
alias: Optional[str] = None, | ||
parameters: Optional[List] = None, | ||
parameters: Optional[Tuple] = None, | ||
): | ||
""" | ||
Runs a query with the ``selectStatement`` and returns the result as a list of rows. | ||
|
@@ -98,7 +98,7 @@ def row_count( | |
selectStatement: str, | ||
sansTran: bool = False, | ||
alias: Optional[str] = None, | ||
parameters: Optional[List] = None, | ||
parameters: Optional[Tuple] = None, | ||
): | ||
""" | ||
Uses the input ``selectStatement`` to query the database and returns the number of rows from the query. | ||
|
@@ -137,7 +137,7 @@ def description( | |
selectStatement: str, | ||
sansTran: bool = False, | ||
alias: Optional[str] = None, | ||
parameters: Optional[List] = None, | ||
parameters: Optional[Tuple] = None, | ||
): | ||
""" | ||
Uses the input ``selectStatement`` to query a table in the db which will be used to determine the description. | ||
|
@@ -364,7 +364,7 @@ def execute_sql_string( | |
sqlString: str, | ||
sansTran: bool = False, | ||
alias: Optional[str] = None, | ||
parameters: Optional[List] = None, | ||
parameters: Optional[Tuple] = None, | ||
omitTrailingSemicolon: Optional[bool] = None, | ||
): | ||
""" | ||
|
@@ -547,7 +547,11 @@ def call_stored_procedure( | |
db_connection.client.rollback() | ||
|
||
def __execute_sql( | ||
self, cur, sql_statement: str, omit_trailing_semicolon: Optional[bool] = None, parameters: Optional[List] = None | ||
self, | ||
cur, | ||
sql_statement: str, | ||
omit_trailing_semicolon: Optional[bool] = None, | ||
parameters: Optional[Tuple] = None, | ||
): | ||
""" | ||
Runs the `sql_statement` using `cur` as Cursor object. | ||
|
I think the List import is not used anymore