From c823727255ec34d62fa15c1b4624e475fe8b89f5 Mon Sep 17 00:00:00 2001 From: Alan Hodgkinson Date: Tue, 21 Feb 2017 10:37:38 +0100 Subject: [PATCH 1/2] Improved parsing of selector attribute and acceptance of JS objects as selectors --- app-pouchdb-query.html | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/app-pouchdb-query.html b/app-pouchdb-query.html index d8abf9f..0745e87 100644 --- a/app-pouchdb-query.html +++ b/app-pouchdb-query.html @@ -62,9 +62,39 @@ ``` This makes selectors more convenient to write declaratively, while still -maintaining the ability to express selectors with full fidelity. For more -documentation on pouchdb-find selectors, please check out the docs +maintaining the ability to express selectors with full fidelity. Note that +embedded strings in selectors (e.g. 'Mario' in the example above) are not +always parsed correctly. In these cases it is better to express the selector +as an object or JSON string, as shown in the example below + +For more documentation on pouchdb-find selectors, please check out the docs [here](https://github.com/nolanlawson/pouchdb-find#dbfindrequest--callback). + +You can also express selectors as objects or JSON strings, which must +conform to the semantics described in the pouchdb-find documentation. JSON +strings can be used as selector attribute values. Javascript objects can be +defined as component properties and passed as a value to the selector. + +Example of object used as a selector: + +```html +