Hi,
I've written a class decorator to define a boilerplate __init__ on some of
my models that inherit from a declarative_base superclass. The problem is
that sqlalchemy.orm.instrumentation._generate_init() has already installed
an __init__ and when I overwrite that, things break with object
Oh by the way, I'm using SQLite as backend.
On Aug 14, 2015 2:04 AM, Jinghui Niu niujing...@gmail.com wrote:
I have three different DBs, one is person.db, another is journal.db, yet
another is tag.db. In the documentation it reads:
Vertical partitioning places different kinds of objects, or
I have three different DBs, one is person.db, another is journal.db, yet
another is tag.db. In the documentation it reads:
Vertical partitioning places different kinds of objects, or different
tables, across multiple databases:
engine1 = create_engine('postgresql://db1')
engine2 =
On 8/14/15 5:07 AM, Jinghui Niu wrote:
Oh by the way, I'm using SQLite as backend.
On Aug 14, 2015 2:04 AM, Jinghui Niu niujing...@gmail.com
mailto:niujing...@gmail.com wrote:
I have three different DBs, one is person.db, another is
journal.db, yet another is tag.db. In the
twophase deals with the transaction commit protocol , and is unlreated to
anything else in your example.
(http://docs.sqlalchemy.org/en/latest/orm/session_api.html#sqlalchemy.orm.session.Session.params.twophase)
You'd simply create an engine3 and bind whatever object classes to it.
FWIW.
this code is incorrect from a Python perspective. You're removing the
original `__init__` method entirely and it is never called; the attempt
to call it using super() just calls object.__init__. SQLAlchemy is
already decorating the __init__ method of the mapped class so you can't
just throw
This works. Thank you for the quick response and great libraries (I use
Mako as well).
Eric
On Fri, Aug 14, 2015 at 9:07 AM, Mike Bayer mike...@zzzcomputing.com
wrote:
this code is incorrect from a Python perspective. You're removing the
original `__init__` method entirely and it is never
Thanks for all these helpful feedback.
If I still want to use SQLite, and I still need to do vertical partition,
what can I do? Am I out of luck?
On Friday, August 14, 2015 at 2:04:37 AM UTC-7, Jinghui Niu wrote:
I have three different DBs, one is person.db, another is journal.db, yet
Thank you very much Jonathan for your very intuitive analogy!
Basically I just want to put people, journal and tag tables(each will
potentially be very large) into different DBs, if I write that logic, how
can I integrate it with SQLAlchemy? Could you give me a rough idea here? Or
point some
On Friday, August 14, 2015 at 5:16:48 PM UTC-4, Jinghui Niu wrote:
If I still want to use SQLite, and I still need to do vertical partition,
what can I do? Am I out of luck?
You can, but not with a two-phase commit.
Two-phase commit basically works like this:
- round 1, everyone
Thanks Jonathan for pointing out the direction, it is very helpful to know
where I can find more info.
On Friday, August 14, 2015 at 5:06:09 PM UTC-7, Jonathan Vanasco wrote:
Well, this problem doesn't really have anything to do with SqlAlchemy --
you should probably ask people for advice on
Well, this problem doesn't really have anything to do with SqlAlchemy --
you should probably ask people for advice on the Sqlite lists or Stack
Overflow.
You can segment out your database into 3 files using the example above.
You will just run into an issue where -- because there isn't a
Just a thought, if I don't commit those three tables together in my
application, can I just use 3 Session objects to commit them separately,
without having to worry about this two phase issue? I want to go simple,
not sure if I can handle this fancy stuff:)
On Friday, August 14, 2015 at
13 matches
Mail list logo