diff options
author | David Moore <davidm@j5int.com> | 2017-07-05 15:06:49 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-07-05 16:21:44 -0400 |
commit | faa6609dac2ce6e55e0f690df3ba88c13133ec5c (patch) | |
tree | f89f6370f67acf35b8909bfc091bfa68c35e7e21 /lib/sqlalchemy/sql/compiler.py | |
parent | b7a51f3a9c90c577e315bc0c3881b4c7623450e2 (diff) | |
download | sqlalchemy-faa6609dac2ce6e55e0f690df3ba88c13133ec5c.tar.gz |
Add support for CACHE and ORDER to sequences
Added new keywords :paramref:`.Sequence.cache` and
:paramref:`.Sequence.order` to :class:`.Sequence`, to allow rendering
of the CACHE parameter understood by Oracle and PostgreSQL, and the
ORDER parameter understood by Oracle. Pull request
courtesy David Moore.
Change-Id: I082c3f8ef56ef89dbaad5da9d5695be5313b0614
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/96
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 6da064797..53009e2df 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2560,6 +2560,10 @@ class DDLCompiler(Compiled): text += " NO MINVALUE" if create.element.nomaxvalue is not None: text += " NO MAXVALUE" + if create.element.cache is not None: + text += " CACHE %d" % create.element.cache + if create.element.order is True: + text += " ORDER" if create.element.cycle is not None: text += " CYCLE" return text |