[MDSAL-616] Add support for Query binding Created: 28/Oct/20  Updated: 28/Oct/20

Status: Confirmed
Project: mdsal
Component/s: Binding API, Binding runtime, DOM API, DOM runtime
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from MDSAL-50 Make MD-SAL Searchable Confirmed

 Description   

Queries come in two kinds:

  1. one-shot
  2. multi-shot
  3. no-shot

Well, we do not care about the last one

At any rate, having an initial go at the Query, esp. with an EffectiveModelContext, we can prepare a match tree, so that things like wildcards are pre-marked, including map-leaf searches. The upshot is that:

  • we can perform schema-based validation and prune impossibilities (or warn, or throw on them)
  • we can optimize matches, i.e. realize when a query's predicates combine into a key equality: then we turn the query into a key-based lookup and a single match
  • we end up with beginnings of an 'query plan'
  • query evaluation has less logic, as knows ahead of time to distinct between direct lookups and searches

The capability is especially important for multi-shot queries in a distributed environment: query preparation can transfer the query to the remote system and let it deal with much of the above. Subsequent executions do not need to transfer the query to the remote system.


Generated at Wed Feb 07 20:10:15 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.