Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.1.0
Description
The `phoenixdb` driver for Python does not alert the user to excess arguments that are not represented by placeholders.
Example 1, fewer arguments than placeholders raise exception (works as expected)
cursor.execute("UPSERT INTO users VALUES (?, ?, ?)", (123, 'John Doe'))
phoenixdb.errors.ProgrammingError: ('Number of columns upserting must match number of values. Numbers of columns: 3. Number of values: 4 tableName=USERS', 1020, '42Y60', None)
Example 2, additional arguments than placeholders is silently ignored
cursor.execute("UPSERT INTO users VALUES (?, ?)", (123, 'John Doe', 'admin'))
The program should generate a similar error to the one above, that the columns need to match the replacements.
Attachments
Issue Links
- links to