-
Notifications
You must be signed in to change notification settings - Fork 92
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
query.create forces optional parameters to required #262
Comments
Same issue is also present in the condition property, e.g. it forces aggregate to be required. I would fix both of them but they not simply optional or required, instead they have rules they follow such as if fieldId is present then formula is not required and vice versa, etc. |
It looks like this is accounted for in the way Or alternatively, if altering those interfaces directly would cause other problems, new union types could be made for |
I'm all for making typings-suitescript reflect 'reality' as much as
possible so adjustments look needed here.
However, I thought I'd throw out the idea of using SuiteQL instead of
traditional imperative query.create(). I _never_ use the imperative query
module - preferring SuiteQL (and dropping back to N/search if SuiteQL
doesn't fit for some reason).
…On Thu, Dec 28, 2023 at 9:34 AM Ben DeMeyer ***@***.***> wrote:
It looks like this is accounted for in the way createColumn and
createCondition are handled. Those use type unions to describe when some
fields are optional/required based on the presence of other fields.
Presumably something similar could be done for the Column & Condition
interfaces themselves.
Or alternatively, if altering those interfaces directly would cause other
problems, new union types could be made for CreateQueryOptions to
reference.
—
Reply to this email directly, view it on GitHub
<#262 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKFNA2UYIZSZQROC2NSV23YLWUTBAVCNFSM6AAAAABBFI6DC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGM3DQMZXGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: <headintheclouddev/typings-suitescript-2.0/issues/262/1871368371@
github.com>
|
I'm making all the attributes of query.Column optional except for fieldId. Does that resolve this? |
When creating a new query using the create# method, columns property's optional properties are forced to be required
here when fieldId is used all other parameters should be optional, but instead they are required
The text was updated successfully, but these errors were encountered: