Conventions

Conventions

These rules apply across all GDQL statements.


Case

Keywords and identifiers are case-insensitive.

You can write SHOWS, shows, or Shows. Song names and other string literals follow the casing you use in quotes.

SHOWS WHERE DATE = 5/8/77;
shows where date = 5/8/77;
Shows From 1977 Limit 5;

Strings

Use double quotes for string literals (song names, venue names, etc.).

SONGS WHERE TITLE = "Scarlet Begonias";
SHOWS WHERE VENUE CONTAINS "Winterland";
PERFORMANCES OF "Eyes of the World";

Single quotes are not used for strings in GDQL. Song and venue names always use double quotes, e.g. "Scarlet Begonias", "Winterland".


Comments

Line comments start with --. Everything from -- to the end of the line is ignored.

-- List shows from May 1977
SHOWS WHERE DATE IN 5/77
ORDER BY DATE
LIMIT 10;
SHOWS FROM 1977;   -- Europe '77
SONGS WITH LYRICS("rose");  -- songs mentioning "rose"

There is no block comment syntax.


Statement termination

Statements can optionally end with a semicolon (;). Multiple statements in one input are separated by semicolons.

SHOWS WHERE DATE = 5/8/77;
SETLIST FOR 5/8/77

Multiple statements in one input (semicolon required between them):

SHOWS FROM 1977 LIMIT 5;
SETLIST FOR 5/8/77;
SONGS WITH LYRICS("train");

Whitespace

Spaces, tabs, and newlines are used for readability. Keywords and identifiers must be separated by whitespace where required (e.g. SHOWS WHERE not SHOWSWHERE).


Summary

ConventionRule
CaseCase-insensitive (keywords, identifiers)
StringsDouble quotes "..."
Comments-- to end of line
Statement endOptional ;; use ; to separate multiple statements
WhitespaceRequired between tokens

See WHERE conditions and Operators for expression syntax.