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

Dates and Guids #7

Merged
merged 2 commits into from
Jun 5, 2022
Merged

Dates and Guids #7

merged 2 commits into from
Jun 5, 2022

Conversation

xiadevisser
Copy link
Owner

@xiadevisser xiadevisser commented Jun 5, 2022

Adds support for Dates and Guids in comparison operators with a third optional parameter, example:

const query = new QueryBuilder()
      .filter(f => f.eq('publishdate', '2022-02-01', ParameterType.datetime)) // or "datetime"
      .toQuery();
query => '?$filter=publishdate eq 2022-02-01';
const query = new QueryBuilder()
      .filter(f => f.eq('guid', '7bd6b28d-68e7-4d21-b540-3377380ce468', ParameterType.guid)) // or "guid"
      .toQuery();
query => '?$filter=guid eq 7bd6b28d-68e7-4d21-b540-3377380ce468';

closes #6

@xiadevisser xiadevisser merged commit 1a8a841 into main Jun 5, 2022
@xiadevisser xiadevisser deleted the feature/6-dats-guid branch June 5, 2022 18:47
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.

Doesn't work with dates
1 participant