Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32962 closed Cleanup/optimization (fixed)

Consolidate string concatenations in BaseDatabaseSchemaEditor.column_sql()

Reported by: Chris Jerdonek Owned by: Chris Jerdonek
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, BaseDatabaseSchemaEditor.column_sql() builds up a sql string by repeated concatenations with itself. I noticed this could be combined into a single ' '.join(...) if an iterator that yields sql parts is factored out. This will eliminate the need to create temporary intermediate strings and should improve readability.

Change History (5)

comment:1 by Mariusz Felisiak, 3 years ago

Triage Stage: UnreviewedAccepted

Tentatively accepted, so we can see what a patch looks like .

comment:3 by Mariusz Felisiak, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 809c45e:

Fixed #32962 -- Consolidated string concatenations in BaseDatabaseSchemaEditor.column_sql().

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

In fe074c96:

Refs #32962 -- Simplified NULL logic in BaseDatabaseSchemaEditor._iter_column_sql().

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