Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
0.9.1
-
None
Description
Add support for prepared cursors:
cursor= connection.cursor(Prepared=True)
|
When executing a SQL statement via cursor.execute() the first time, the sql statement will be parsed, prepared and executed. Subsequent calls to cursor.execute()`will irgnore the statement string, since it was already prepared but executing it again using the values specified in 2nd parameter of execute().
Example:
cursor= connection.cursor(Prepared=True)
|
cursor.execute("INSERT INTO t1 VALUES (?,?)", (1,2)) |
cursor.execute("INSERT INTO t1 VALUES (?,?)", (3,4)) |
# this will also work, since the sql statement will be ignored |
cursor.execute("", (2,3)) |