For the external Firebird dialect I am trying to get the following to work. 
It's really identical to the Oracle equivalent, except for the dialect 
name, but that's my issue.

kw = {
        "prefixes": ["GLOBAL TEMPORARY"],
        "firebird_on_commit": "PRESERVE ROWS",
    }
metadata = sa.MetaData()
user_tmp = sa.Table(
    "user_tmp",
    metadata,
    sa.Column("id", sa.INT, primary_key=True),
    sa.Column("name", sa.VARCHAR(50)),
    sa.Column("foo", sa.INT),
    sa.UniqueConstraint("name", name="user_tmp_uq"),
    sa.Index("user_tmp_ix", "foo"),
    **kw
)
metadata.create_all(bind=engine)


I found the place in oracle/base.py (OracleDialect class) where its 
declarations *appear *to be taking place ...

construct_arguments = [
    (
        sa_schema.Table,
        {"resolve_synonyms": False, "on_commit": None, "compress": False},
    ),
    (sa_schema.Index, {"bitmap": False, "compress": False}),
]


... but when I put the same thing for "on_commit" in FBDialect and run my 
test code I continue to get

sqlalchemy.exc.ArgumentError: Argument 'firebird_on_commit' is not accepted 
> by dialect 'firebird' on behalf of <class 'sqlalchemy.sql.schema.Table'>
>

I've tried tracing through the code when hitting an Oracle database (which 
works) but I'm just not seeing where 'on_commit' becomes a "thing" for the 
oracle dialect.

Any suggestions on where else I should look?

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/5eeb1cb9-2ae8-47a0-bb1b-85d70db6e204%40googlegroups.com.

Reply via email to