Skip to content

[FR] Implement an oData filter builder #2

@HelgeSverre

Description

@HelgeSverre

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions