Mercurial > urweb
changeset 546:7417c4b57aeb
Sequences
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 07 Dec 2008 10:25:55 -0500 (2008-12-07) |
parents | f31aa2a3a72d |
children | 8e615bb605c9 |
files | doc/manual.tex |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/manual.tex Sun Dec 07 10:24:23 2008 -0500 +++ b/doc/manual.tex Sun Dec 07 10:25:55 2008 -0500 @@ -1187,4 +1187,14 @@ \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} \end{array}$$ +\subsubsection{Sequences} + +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. + +$$\begin{array}{l} + \mt{type} \; \mt{sql\_sequence} \\ + \mt{val} \; \mt{nextval} : \mt{sql\_sequence} \to \mt{transaction} \; \mt{int} +\end{array}$$ + + \end{document} \ No newline at end of file