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 /test | |
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 'test')
-rw-r--r-- | test/sql/test_defaults.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sql/test_defaults.py b/test/sql/test_defaults.py index 3cc7e715d..3c4ccc050 100644 --- a/test/sql/test_defaults.py +++ b/test/sql/test_defaults.py @@ -963,6 +963,18 @@ class SequenceDDLTest(fixtures.TestBase, testing.AssertsCompiledSQL): ) self.assert_compile( + CreateSequence(Sequence( + 'foo_seq', cache=1000, order=True)), + "CREATE SEQUENCE foo_seq CACHE 1000 ORDER", + ) + + self.assert_compile( + CreateSequence(Sequence( + 'foo_seq', order=True)), + "CREATE SEQUENCE foo_seq ORDER", + ) + + self.assert_compile( DropSequence(Sequence('foo_seq')), "DROP SEQUENCE foo_seq", ) |