SF Markus Elfring elfr...@users.sourceforge.net wrote:
Now I stumble on an error message like the following.
...
cursor.executemany(statement, parameters)
sqlalchemy.exc.IntegrityError: (IntegrityError) UNIQUE constraint failed:
positions.function,
...
The message might be
SQLAlchemy sends to the log the statement and parameters it is to send
to the DBAPI cursor.execute() method, *before* it actually does so.
This so that if the DBAPI throws an exception, as is the case here,
one can see what instructions were sent to it which were the immediate
cause of this
SF Markus Elfring elfr...@users.sourceforge.net wrote:
SQLAlchemy sends to the log the statement and parameters it is to send
to the DBAPI cursor.execute() method, *before* it actually does so.
This so that if the DBAPI throws an exception, as is the case here,
one can see what instructions
Should I get the exception sqlalchemy.exc.IntegrityError directly
after I attempted to insert a second record set with unique attributes
into a SQLite table?
I don’t have a stack trace here to see what the nature of the issue is
but it is likely that the INSERT is proceeding using DBAPI
SF Markus Elfring elfr...@users.sourceforge.net wrote:
Should I get the exception sqlalchemy.exc.IntegrityError directly
after I attempted to insert a second record set with unique attributes
into a SQLite table?
I don’t have a stack trace here to see what the nature of the issue is
but it
There is no way to use the second form while being able to record the moment
each parameter set is used, unless the DBAPI itself provides additional hooks
for logging at this level. However, this logging would defeat some of the
purpose of executemany(), which is that of processing many
Hello,
I am using source code like the following in one of my scripts
where I am trying the software packages SQLAlchemy 0.9.7-77.1
and SQLite 3.8.7.2-1.1 out on my openSUSE system.
...
engine = create_engine(sqlite:///:memory:, echo = False)
base = declarative_base()
class position(base):