Skip to content

Support for "contains" filter string function #43

Description

@attieretief

The ODATAV4 standard supports the string function "contains"

http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc444868693

See 11.2.5.1.2 Built-in Query Functions in the following section

http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_Toc453752288

If implemented exactly the same way as this project already implements "startswith" and "endswith", then wildcard search on specified attributes can be used.

This was achieved by modifiying property.py

    def contains(self, value):
        value = self.escape_value(value)
        return u'contains({0}, {1})'.format(self.name, value)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions