summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-09-26 23:29:11 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-09-26 23:29:11 +0000
commit32ee73460d011cb400cb8ef55fe13a201af3441c (patch)
tree2669a259f98d10f5b5f1f34291ea83645d657e52
parentc13eb665aadc3fdba694a47f6ae268b64696c70f (diff)
downloadsqlalchemy-32ee73460d011cb400cb8ef55fe13a201af3441c.tar.gz
add micro-doc for sequence standalone execution
-rw-r--r--doc/build/content/metadata.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/build/content/metadata.txt b/doc/build/content/metadata.txt
index a76cd6724..1baa66364 100644
--- a/doc/build/content/metadata.txt
+++ b/doc/build/content/metadata.txt
@@ -396,6 +396,12 @@ When the `Sequence` is associated with a table, CREATE and DROP statements issue
The flag `optional=True` on `Sequence` will produce a sequence that is only used on databases which have no "autoincrementing" capability. For example, Postgres supports primary key generation using the SERIAL keyword, whereas Oracle has no such capability. Therefore, a `Sequence` placed on a primary key column with `optional=True` will only be used with an Oracle backend but not Postgres.
+A sequence can also be executed standalone, using an `Engine` or `Connection`, returning its next value in a database-independent fashion:
+
+ {python}
+ seq = Sequence('some_sequence')
+ nextid = connection.execute(seq)
+
### Defining Constraints and Indexes {@name=constraints}
#### UNIQUE Constraint