Opened 5 years ago

Closed 4 years ago

#17574 closed Cleanup/optimization (fixed)

Cleanup in the introspection code

Reported by: Claude Paroz Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: introspection
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


While working on #7783, I did some improvements on the introspection code:

  • moved the 'standard' get_primary_key_column at base backend (only SQLite overrides it)
  • added the missing get_key_columns implementation for PostgreSQL
  • in tests, the IgnoreNotimplementedError class should be replaced by @skip decorators if needed
  • test_get_key_columns should be skipped on MySQL with MyISAM engine

Tested with SQLite, MySQL (InnoDB and MyISAM), PostgreSQL. I don't have access to Oracle to test.

Attachments (2)

17574-1.diff (5.5 KB) - added by Claude Paroz 5 years ago.
Introspection code improvements
17574-2.diff (3.8 KB) - added by Claude Paroz 4 years ago.
Updated after 09a9971

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by Claude Paroz

Attachment: 17574-1.diff added

Introspection code improvements

comment:1 Changed 5 years ago by Jannis Leidel

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Claude Paroz <claude@…>

In [09a99714c05316717d2797afd2e458dbf6aa880f]:

Moved get_primary_key_column implementation to base

Refs #17574.

Changed 4 years ago by Claude Paroz

Attachment: 17574-2.diff added

Updated after 09a9971

comment:3 Changed 4 years ago by Claude Paroz

Still needs to be tested with Oracle

comment:4 Changed 4 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 0171ba65dbbff377282c03b86c83036168c84b22:

Fixed #17574 -- Implemented missing get_key_columns in PostgreSQL backend

Note: See TracTickets for help on using tickets.
Back to Top