Difference between revisions of "SPQL: SPecies Query Language"
From Gcube Wiki
Line 29: | Line 29: | ||
coordinate: FLOAT ',' FLOAT | coordinate: FLOAT ',' FLOAT | ||
− | |||
− | |||
returnExpression: '*' (havingExpression)? | 'Occurrence' | 'Taxon' | returnExpression: '*' (havingExpression)? | 'Occurrence' | 'Taxon' |
Revision as of 17:15, 26 March 2013
SPQL is a language used to query the Species Product Discovery Service
Grammar
query: terms (IN identifiers)? (WHERE expressions)? (RETURN returnExpression)? terms: term (',' term)* term: words AS (('ScientificName'|'SN') | ('CommonName'|'CN')) words: word (',' word)* word : STRING identifiers: identifier (',' identifier)* identifier: ID expressions: expression (AND expression)* expression: (bc=boundCondition | dateCondition) boundCondition: ('lowerBound' | 'upperBound') IS coordinate dateCondition: ('fromDate' | 'toDate') IS date date: INT '/' INT '/' INT coordinate: FLOAT ',' FLOAT returnExpression: '*' (havingExpression)? | 'Occurrence' | 'Taxon' havingExpression: HAVING 'Occurrence' | 'Taxon'