Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6407

phoenixdb for Python silently ignores placeholders < placeholder arguments

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              richardantal Richárd Antal
              bendemott Ben DeMott
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: