[sqlalchemy] Re: Bug? Query / Execute Mismatch When Given Duplicate Columns

2018-07-02 Thread Michael Tartre
(SQLAlchemy version is 1.1.13) On Monday, July 2, 2018 at 7:54:22 PM UTC-4, Michael Tartre wrote: > > Hey there! > > I noticed the following odd behavior: > > import sqlalchemy as sa > engine = sa.create_engine('sqlite:///tmp.db', echo=True) > tblsa = sa.Table("mytable", sa.MetaData(),

[sqlalchemy] Bug? Query / Execute Mismatch When Given Duplicate Columns

2018-07-02 Thread Michael Tartre
Hey there! I noticed the following odd behavior: import sqlalchemy as sa engine = sa.create_engine('sqlite:///tmp.db', echo=True) tblsa = sa.Table("mytable", sa.MetaData(), autoload=True, autoload_with=engine) q = sa.select([tblsa.c.x, tblsa.c.x]) with engine.connect() as conn:

Re: [sqlalchemy] Redefine table

2018-07-02 Thread Mike Bayer
tables can be altered additively, sure from sqlalchemy import * from sqlalchemy.schema import CreateTable m = MetaData() # table w/ no PK t = Table( "nopk", m, Column('q', Integer), Column('p', Integer) ) # add a column w/ pk=True t.append_column(Column('id', Integer,

Re: [sqlalchemy] ibm_db_sa returning returning error as 'Segmentation fault (core dumped)' for IBM i series

2018-07-02 Thread Mike Bayer
DB2 is supported at: https://groups.google.com/forum/#!forum/ibm_db On Mon, Jul 2, 2018 at 7:21 AM, wrote: > I am using ibm_db_sa and as400 drivers to connect db2 for i. When I am going > to fetch data from the table which is not exists in db, then without giving > proper message application

[sqlalchemy] Redefine table

2018-07-02 Thread Javier Collado Jiménez
Hello! Is there a way to redefine a table in metadata? I'm trying to define a table without pk to create this way in the database, and then trying to add the pk to the definition to use it. But I'm always getting this error sqlalchemy.exc.ArgumentError: Column object 'column' already assigned to

[sqlalchemy] ibm_db_sa returning returning error as 'Segmentation fault (core dumped)' for IBM i series

2018-07-02 Thread siddhesh
I am using ibm_db_sa and as400 drivers to connect db2 for i. When I am going to fetch data from the table which is not exists in db, then without giving proper message application throws following error (Expected error is : Table does not exists or something related to that) Segmentation

Re: [sqlalchemy] M2M relationship back_populates KeyError

2018-07-02 Thread Simon King
On Mon, Jul 2, 2018 at 4:39 AM Juan wrote: > > Hi, > > I do not know if this is that I am missing something in how SQLAlchemy > works or an issue; I have read the doc and searched for an explanation > but could not find an answer. > > When appending via an intermediate table, a M2M relationship