Skip to content

Verify: Update record #4

Open
Open

Description

@debba

Description

Verify that updating records works correctly against a real Db2 instance.

Methods to verify

  • update_record — update a row by primary key column

Acceptance criteria

  • Rows are correctly updated by primary key
  • All supported data types are handled
  • Error handling for missing keys or constraint violations works

Part of the WIP verification checklist in README.

Activity

  1. lichenghsu commented on Sep 3, 2026

    @lichenghsu

    Hit a bug in update_record on a table without a primary key (ST1.INS_OTP).

    The plugin emits an empty quoted identifier in the WHERE clause:

    UPDATE "ST1"."INS_OTP" SET ... WHERE "" = ?
    

    Db2 rejects it:

    SQL0104N  An unexpected token """" was found following
    "ST1"."INS_OTP" WHERE.  SQLSTATE=42601
    

    Tabularis 0.16.0, db2-plugin (ODBC, DB2/LINUXX8664).

    Expected: when no PK/unique index exists, either build the WHERE from all
    selected columns, or fail early with a clear "table has no primary key" error
    instead of generating invalid SQL.

    Repro: any Db2 table with no primary key and no unique index → edit a cell in
    the data grid → save.

  2. debba commented on Sep 3, 2026

    @debba
    CollaboratorAuthor

    It looks you are using a very old version of Tabularis .
    Btw would you like to open a PR for this plugin?
    We are looking for some contributors for DB2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions