liveBook · Manning

String filter representation

As explained in API Design Patterns

A string filter representation expresses filtering criteria as a text value interpreted according to a filter syntax.

A string filter representation expresses filtering criteria as text conforming to a specific syntax. The API server parses and evaluates it to return only matching resources. section 22.3.1

Structured filters shift parsing and schema construction to the client, while string filters keep that responsibility on the API server. Both can express equivalent criteria; the practical choice concerns usability and future flexibility. section 22.3.1

Filtering ChatRoom resources

A string filter can select a ChatRoom with the title “New Chat!” using: SELECT * FROM ChatRooms WHERE title = "New Chat!";

How API Design Patterns covers it

How deep it goes
Explains server parsing, client responsibility, equivalence, and serialization or parsing transformations, without prescribing a syntax.
Examples
Uses SQL ChatRoom queries and contrasts equivalent MongoDB structures for common filtering operators.
What you can do after
Evaluate string and structured filter designs by usability, flexibility, responsibility placement, and functional equivalence.
How it connects
Connects filtering with structured representations, parsing, serialization, API servers, SQL, and MongoDB.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of API Design Patterns. The section links point to the parts of the book it draws on.