diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-17 19:43:45 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-17 19:43:45 -0400 |
commit | e3f07f7206cf0d6a5f2ff9344a365f4657645338 (patch) | |
tree | 4cc5b438354fd374f4bdd8719251341b6030efb0 /test | |
parent | 1f2f88d8ffaac5ae98de097e548e205778686cd5 (diff) | |
download | sqlalchemy-e3f07f7206cf0d6a5f2ff9344a365f4657645338.tar.gz |
- Added support for the Oracle table option ON COMMIT. This is being
kept separate from Postgresql's ON COMMIT for now even though ON COMMIT
is in the SQL standard; the option is still very specific to temp tables
and we eventually would provide a more first class temporary table
feature.
- oracle can apparently do get_temp_table_names() too, so implement that,
fix its get_table_names(), and add it to #3204. fixes #3204 again.
Diffstat (limited to 'test')
-rw-r--r-- | test/dialect/test_oracle.py | 17 | ||||
-rw-r--r-- | test/requirements.py | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py index 187042036..36eacf864 100644 --- a/test/dialect/test_oracle.py +++ b/test/dialect/test_oracle.py @@ -648,6 +648,23 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): "CREATE INDEX bar ON foo (x > 5)" ) + def test_table_options(self): + m = MetaData() + + t = Table( + 'foo', m, + Column('x', Integer), + prefixes=["GLOBAL TEMPORARY"], + oracle_on_commit="PRESERVE ROWS" + ) + + self.assert_compile( + schema.CreateTable(t), + "CREATE GLOBAL TEMPORARY TABLE " + "foo (x INTEGER) ON COMMIT PRESERVE ROWS" + ) + + class CompatFlagsTest(fixtures.TestBase, AssertsCompiledSQL): def _dialect(self, server_version, **kw): diff --git a/test/requirements.py b/test/requirements.py index cfdfc8054..80bd135e9 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -300,7 +300,7 @@ class DefaultRequirements(SuiteRequirements): def temp_table_names(self): """target dialect supports listing of temporary table names""" - return only_on(['sqlite']) + return only_on(['sqlite', 'oracle']) @property def temporary_views(self): |