Skip to content

True/False support in queries, get APIs #153

@abose

Description

@abose

Currently, we cant give queries like this:

// syncPending is a binary JSON field.
db.query(EXTENSIONS_DETAILS_TABLE, "$.syncPending=true");

However, SQL supports the following query string

SELECT * FROM table where  document->"$.syncPending" = true;
  • We should support binary field values in queries. This is fairly straightforward for non-indexed fields and needs minor adjustments in the query parser to recognize true/false.
  • For indexed fields, there appear to be some issues as SQL doesn't have native binary column types. But may be type compatible https://www.mysqltutorial.org/mysql-boolean/ . investigate if boolean indexed columns can be searched with true/false or should we translate it to 1/0 we should not index on binary fields.

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