.
I also came across a nice graphical illustration of the race condition
associated with concurrent INSERT
here: http://rachbelaid.com/handling-race-condition-insert-with-sqlalchemy/
On Thursday, February 4, 2021 at 5:42:40 PM UTC-8 Vitaly Kruglikov wrote:
> Thanks Mike! I followed up on y
Thanks Mike! I followed up on your suggestion concerning savepoints and
came up with the following code snippet. Does this look right to you?
```
try:
with orm_session.begin_nested():
orm_session.add(record)
except psycopg2.errors.UniqueViolation as error: # or is it
How can the query/merge or query/add be performed atomically? What would
happen if between the two calls another process inserted a row with the
same unique key? Wouldn't the `s.merge()` then trigger a
`psycopg2.errors.UniqueViolation` exception (in postgres case) when the new
row insert is
My table has a unique index on the column named "tag". When I attempt to
insert a row with a tag value that already exists in the table, sqlalchemy
raises the generic exception `IntegrityError`.
`IntegrityError` may be raised for various scenarios, including Foreign Key
Violation and Unique
ing else'
> 4 unique_id = id(unique)
5
6
TypeError: 'str' object is not callable
```
On Saturday, August 22, 2020 at 8:09:19 AM UTC-7 Richard Damon wrote:
> On 8/22/20 10:46 AM, Vitaly Kruglikov wrote:
> > I suspect this has something to do with the combination of t
Please note, that I posted, then deleted a message with the same subject in
order to correct some relevant information, and this post replaces the one
I deleted.
On Saturday, August 22, 2020 at 7:43:42 AM UTC-7 Vitaly Kruglikov wrote:
> Dear all,
>
> I am using:
> sqlalchemy==1.3.1
Dear all,
I am using:
sqlalchemy==1.3.18
psycopg2==2.8.4
connection url schema: "postgresql+psycopg2://..."
postgres 10.x
My code looks like this:
```
_AutomapBase = automap.automap_base()
class Model1(_AutomapBase):
__tablename__ = 'model1"
id_ = sa.Column('id', sa.Integer,
Dear all,
I am using:
sqlalchemy==1.3.18
psycopg2==2.8.4
connection url schema: "postgresql+psycopg2://..."
postgres 10.x
when I define an explicit AutomapBase-derived model for
'sqa_global_context' table with only the primary key, I expected that
running
bjects as the one you are creating with SqaGlobalContext
> will not be affected.
>
>
>
> On Tue, Aug 18, 2020, at 1:59 PM, Vitaly Kruglikov wrote:
>
> Dear all,
>
> I am using:
> sqlalchemy==1.3.18
> psycopg2==2.8.4
> connection url schema: "postgresql+ps
I just noticed a TYPO - but google groups doesn't let me edit my post. In a
couple of places in my post, I accidentally entered `sqa_global_context` as
the table name instead of `ewf_sqa_global_context`. But in actual code that
I am executing, it's `ewf_sqa_global_context` everywhere.
--
Dear all,
I am using:
sqlalchemy==1.3.18
psycopg2==2.8.4
connection url schema: "postgresql+psycopg2://..."
postgres 10.x
when I define an explicit AutomapBase-derived model for
'sqa_global_context' table with only the primary key, I expected that
running
11 matches
Mail list logo