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
UPDATE: seems that we need to switch on EnumConstrType, and create helper methods named based on something like <Type>_<Enum>, e.g. Constraint_CONSTR_FOREIGN or some case() method variation for better readability.
Seems that the polymorphic nature of Constraint via ConstrType has left those names out of the protobuf, for our own implementation:
Likely this means that likely we don't need to add them directly, but consider how naming conventions should work in general for these types of scenarios
ReferenceConstraint
ConstraintStmt
ExclusionConstraint
example of ConstraintStmt in pgsql-parser, first you'll see that Constraint is the actual node:
the others are technically our own made up names. ConstraintStmt happens to be a generic way to insert certain general onstraint utilties, and even supports other constraint types. Essentially, ReferenceConstraint, ConstraintStmt, ExclusionConstraint are helpers for Constraint:
UPDATE: seems that we need to
switch
onEnum
ConstrType
, and create helper methods named based on something like<Type>_<Enum>
, e.g.Constraint_CONSTR_FOREIGN
or somecase()
method variation for better readability.Seems that the polymorphic nature of
Constraint
viaConstrType
has left those names out of the protobuf, for our own implementation:https://github.com/pganalyze/libpg_query/blob/1ec38940e5c6f09a4c1d17a46d839a881c4f2db7/protobuf/pg_query.proto#L1735
https://github.com/pganalyze/libpg_query/blob/1ec38940e5c6f09a4c1d17a46d839a881c4f2db7/protobuf/pg_query.proto#L2895-L2912
Likely this means that likely we don't need to add them directly, but consider how naming conventions should work in general for these types of scenarios
ReferenceConstraint
ConstraintStmt
ExclusionConstraint
example of
ConstraintStmt
in pgsql-parser, first you'll see thatConstraint
is the actual node:the others are technically our own made up names.
ConstraintStmt
happens to be a generic way to insert certain general onstraint utilties, and even supports other constraint types. Essentially,ReferenceConstraint
,ConstraintStmt
,ExclusionConstraint
are helpers forConstraint
:The text was updated successfully, but these errors were encountered: