Create engine with given dialect object
Issue #3386
wontfix
I want to have same dialect object for different engines (for example, main and mock), so I want to define dialect not only with url string, but also with specifying dialect object.
primary_engine = create_engine(connect_url, **other_params)
pass # do something here
mock_engine = create_engine(primary_engine.dialect, strategy=mock, executor=some_executor)
# Or better to have something like this:
mock_engine = create_mock_engine(primary_engine.dialect, executor=some_executor')
Now I have to care about which dialect I use like this:
primary_engine = create_engine(connect_url, **other_params)
pass # do something here
mock_engine = create_engine('postgres:///', strategy=mock, executor=some_executor)
Comments (2)
-
repo owner -
repo owner - changed status to wontfix
no response, so closing this for now.
- Log in to comment
why do you need to share the actual dialect object? Why can't the new engine have its own dialect which you specify with the string lookup as always?
e.g.:
?