Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Add your comments directly to the page. Include links to any relevant research, data, or feedback.

Status

IN PROGRESS

Impact

LOW

Driver

Pablo Pazos 

Approver

Contributors

Informed

Due date

Outcome

Background

When using parameters in AQL queries, there is no specification about the use of quotes: if the substitution will or not check for quotes to be present and add if not, or if parameter substitution will not add the queries around the substituted value.

PP:

About this issue, IIRC I detected inconsistencies between implementations on the quotes applied to the parameters, for instance:

Option 1) explicit quotes, substitution doesn’t check or add quotes

select e/ehr_id, e/time_created, e/system_id from EHR e CONTAINS COMPOSITION c WHERE c/archetype_node_id=’$archetype_id’

vs.

Option 2) implicit quotes, substitution check and adds quotes if missing

select e/ehr_id, e/time_created, e/system_id from EHR e CONTAINS COMPOSITION c WHERE c/archetype_node_id=$archetype_id

If the implementation does a simple substitution of values, option 1 would be correct, since what finishes in the WHERE condition is a string constant. But if the replacement already considers adding the quotes if those are missing, the second example will work as well.

The issue is: there is no specification around this, or at least I didn’t find it.

This might also be considered as one of those processing rules that we need to define, maybe a “pre-processing” rule in this case.

Options considered

Option 1:

Option 2:

Pablo

(plus)

Ian

(plus)

Christian

(plus)

Thomas

(plus)

Action items

  • Choose which option feels better
  • Specify in the AQL spec

Outcome

The quote criteria for parameters should be added to the spec.

  • No labels