Skip to content

can't detect pk in some DBMS #31

Description

@deffence1776

In some DBMS, DatabaseMetaData#getPrimaryKeys returns COLUMN_NAME in lowercase.
(I tried sqlite3)

I think you should add String#toUpperCase when you get primarykey's column name at org.assertj.db.type.Table#collectPrimaryKeyName

     while (resultSet.next()) {
        String columnName = resultSet.getString("COLUMN_NAME").toUpperCase();
        if (getColumnsNameList().indexOf(columnName) != -1) {
          pksNameList.add(columnName);
        }
      }

Thank you.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions