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

[FR] Implement an oData filter builder #2

Open
HelgeSverre opened this issue Apr 8, 2019 · 0 comments
Open

[FR] Implement an oData filter builder #2

HelgeSverre opened this issue Apr 8, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@HelgeSverre
Copy link
Contributor

To make it easier to work with oData filters, a builder should be created.

Example of how this would look like in practice:

<?php 

$customerQuery = oDataQuery::query()
     ->LessThanOrEqual("CustomerNumber" , 100)
     ->orderByAsc("Name");

// Fetch only customers where the CustomerNumber is less than or equal to 100, and order by the Name ascending.

$service->getCustomers($customerQuery);

$customerQuery->build(); // "?$filter=(CustomerNumber le 100)&$orderBy=Name asc"
@HelgeSverre HelgeSverre added the enhancement New feature or request label Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant