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):
__tablename__ = "positions"
function = Column(String, primary_key = True)
source_file = Column(String, primary_key = True)
line = Column(Integer, primary_key = True)
column = Column(Integer, primary_key = True)
void = Column(Integer, default = 0)
static = Column(Integer, default = 0)
data_type = Column(String)
parameter = Column(String)
...
def store_positions(fun, type, point, places):
"""Add source code positions to an internal table."""
...
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 appropriate in principle for my concrete use case.
But I observe that the constraint violation is reported a bit
too late because I got the impression from corresponding debug
output that three rows were added to the shown table here
with unique attributes.
I would appreciate your explanations and further advices.
Regards,
Markus
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.