nuodb-python icon indicating copy to clipboard operation
nuodb-python copied to clipboard

execute() does not fail if an incorrect number of parameters is specified

Open philip-stoev opened this issue 12 years ago • 2 comments

Statements such as:

    cursor.execute("SELECT ? FROM DUAL");
    cursor.execute("SELECT ?, ? FROM DUAL", []);

must fail with an exception such as "wrong number of parameters specified, expected X got Y". Otherwise, simple typos may lead to data loss or wrong results.

Others fail with an exception "TypeError: init() takes exactly 2 arguments (1 given)" which is not very informative.

philip-stoev avatar Jun 10 '13 14:06 philip-stoev