Re: [sqlalchemy] Differences between TableClause insert and Model.__table__ inserts?

2020-11-26 Thread Kata Char
's Core, so the ORM's `.__table__` attribute is the Core's > `table()` object. > > Since they're the same, the two will have the same performance within > `conn.execute(`. > > On Wednesday, November 25, 2020 at 4:18:46 PM UTC-5 Kata Char wrote: > > I see, does

Re: [sqlalchemy] Differences between TableClause insert and Model.__table__ inserts?

2020-11-25 Thread Kata Char
(), [{...}, ...])` On Wednesday, November 25, 2020 at 8:27:53 AM UTC-8 Mike Bayer wrote: > > > On Wed, Nov 25, 2020, at 10:30 AM, Kata Char wrote: > > Hi, sorry if this post is a duplicate, my first one didn't seem to make it. > > I was reading the documentation: > - https://d

[sqlalchemy] Differences between TableClause insert and Model.__table__ inserts?

2020-11-25 Thread Kata Char
Hi, sorry if this post is a duplicate, my first one didn't seem to make it. I was reading the documentation: - https://docs.sqlalchemy.org/en/13/core/tutorial.html#execute-multiple - https://docs.sqlalchemy.org/en/13/_modules/examples/performance/bulk_inserts.html Is there any difference betwee

[sqlalchemy] Implementing archive deletion for models with relationships

2019-07-30 Thread Kata Char
Hi, I was wondering if I can get some pointers on how to do this. I want to copy data to an archive table before deleting the data. So let's say I have a model like below class ModelA(...): id = db.Column(db.Integer, primary_key=True) fake_model_id = db.Column(db.Integer,db.ForeignKey('so