Skip to content

Commit

Permalink
Add explanation on how to escape single quotes in string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
gmantele committed Oct 18, 2023
1 parent eb16d53 commit ec9aa40
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ADQL.tex
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,21 @@ \subsubsection{Case sensitivity}
\subsubsection{Literals}
\label{sec:literals}

String literals are expressed as a character expression delimited by single quotes.
String literals are expressed as a character expression delimited by single
quotes.

\begin{verbatim}
<character_string_literal> ::=
<quote> [ <character_representation>... ] <quote>
\end{verbatim}

A single quote inside a string literal must be escaped with a second single
quote. For instance:

\begin{verbatim}
'Earth''s satellite is the Moon.'
\end{verbatim}

Numeric literals are expressed as an exact decimal value, e.g. \verb:12: or
\verb:12.3:, or a floating point number with an exponent, e.g. \verb:12.3E4:.

Expand Down Expand Up @@ -2920,6 +2928,8 @@ \subsection{Between 2.0 and 2.1}
(see \AppendixRef{sec:features})
\item Syntax description for comments inside a query
(see \SectionRef{sec:comments})
\item Description of how to escape single quotes in a string
literal (see \SectionRef{sec:literals})
\end{itemize}
\item \textbf{Updated}
\begin{itemize}
Expand Down

0 comments on commit ec9aa40

Please sign in to comment.