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

Add typings for all abstract sql fragments, fixing where necessary #104

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Page-
Copy link
Collaborator

@Page- Page- commented Jun 12, 2024

@Page- Page- requested a review from a team June 12, 2024 12:43
@Page- Page- marked this pull request as ready for review June 12, 2024 13:15
@Page- Page- enabled auto-merge June 12, 2024 13:15
'LessThanOrEqual',
from,
to,
],
...equality,
},
};
} satisfies Record<string, NativeFactTypes[string]>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be satisfies NativeFactTypes; ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could but that's not accurate to what it is, because it is not itself a NativeFactTypes but rather a dictionary of fragments of them, so I made the typing in such a way as to try to represent that difference

'ends with': (from: string, to: string) => ['Endswith', from, to],
contains: (from: string, to: string) => ['Contains', from, to],
'starts with': (from, to): StartsWithNode => ['StartsWith', from, to],
'ends with': (from, to): EndsWithNode => ['EndsWith', from, to],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And one doubt, why did EndsWith required the backwards compactible change having both Endswith & EndsWith but StartsWith doesn't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because StartsWith had previously been done for a translation

@Page- Page- requested a review from otaviojacobi June 12, 2024 21:03
@Page- Page- merged commit fa6065e into master Jun 12, 2024
49 checks passed
@Page- Page- deleted the abstract-sql-types-fixes branch June 12, 2024 21:07
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

Successfully merging this pull request may close these issues.

2 participants