Mercurial > urweb
comparison doc/manual.tex @ 546:7417c4b57aeb
Sequences
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 07 Dec 2008 10:25:55 -0500 |
parents | f31aa2a3a72d |
children | 8e615bb605c9 |
comparison
equal
deleted
inserted
replaced
545:f31aa2a3a72d | 546:7417c4b57aeb |
---|---|
1185 A $\mt{DELETE}$ command is formed from a table and a $\mt{WHERE}$ clause. | 1185 A $\mt{DELETE}$ command is formed from a table and a $\mt{WHERE}$ clause. |
1186 $$\begin{array}{l} | 1186 $$\begin{array}{l} |
1187 \mt{val} \; \mt{delete} : \mt{fields} ::: \{\mt{Type}\} \to \mt{sql\_table} \; \mt{fields} \to \mt{sql\_exp} \; [\mt{T} = \mt{fields}] \; [] \; [] \; \mt{bool} \to \mt{dml} | 1187 \mt{val} \; \mt{delete} : \mt{fields} ::: \{\mt{Type}\} \to \mt{sql\_table} \; \mt{fields} \to \mt{sql\_exp} \; [\mt{T} = \mt{fields}] \; [] \; [] \; \mt{bool} \to \mt{dml} |
1188 \end{array}$$ | 1188 \end{array}$$ |
1189 | 1189 |
1190 \subsubsection{Sequences} | |
1191 | |
1192 SQL sequences are counters with concurrency control, often used to assign unique IDs. Ur/Web supports them via a simple interface. The only way to create a sequence is with the $\mt{sequence}$ declaration form. | |
1193 | |
1194 $$\begin{array}{l} | |
1195 \mt{type} \; \mt{sql\_sequence} \\ | |
1196 \mt{val} \; \mt{nextval} : \mt{sql\_sequence} \to \mt{transaction} \; \mt{int} | |
1197 \end{array}$$ | |
1198 | |
1199 | |
1190 \end{document} | 1200 \end{document} |