Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueStringType can be optimized to be more precise and easy for use #61

Open
PierreREN opened this issue May 23, 2020 · 0 comments
Open

Comments

@PierreREN
Copy link

When using ValueStringType which extends AnyGenericValueType containing a serie of different string-type value, dealing with the uncertainty of which attribute may be used can be very confusing and exhausting. At the same time, unnecessary storage zone is required for saving the sparse object into database. All these inconvenience may be avoided by introducing more storage-economic and esay-use design:

Redesign ValueStringType like
{
valueString: string,
valueStringTypeType: ValueStringTypeType,
}

where ValueStringTypeType like
{
valueStringType: ValueStringTypeEnum,
otherValue: string,
}

and ValueStringTypeEnum exactly refer to the attribute names in current AnyGenericValueType.

In such a way, single-value cases shall be dealed with quite well.

And in case of some more complicated cases, where multiple attributes are filled at the same time, something like grouping mechanism such as ValueStringSet or nested ValueString need to be introduced. But there is already a list for containing different values, will this supposition be really necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant