You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dmitry Ovsyanko edited this page Oct 2, 2023
·
4 revisions
DbObjectMerger is an ObjectMerger descendant used by DbSchemaSource for merging complete database object definitions from their distinct parts presented as files subject to require.
It only overrides the add (a, b, k) method for the sole case k === 'pk' (meaning primary key): if a and b are both defined,
or one must be a 1-element array consisting of the other: e. g. 'id' and ['id']
in that case, the array is the result.
So, unlike with base ObjectMerger, an attempt to merge, say, ['dt'] and ['no'] as pk values raises an error instead of resulting in ['dt', 'no'] array.
pk is the only property name special to DbObjectMerger. For all other fields, it behaves like the base class.