[sqlalchemy] inserts rows in wrong order

2015-12-03 Thread Nana Okyere
I'm inserting rows into a reflected table as: m = db.MetaData() t = db.Table(tablename,m,autoload = True, autoload_with = db.engine) # create a list of dictionaries called output_batch. then do ... db.engine.execute(t.insert(),output_batch) I'm using flask-sqlalchemy hence the db object. The

[sqlalchemy] load_only doesn't affect joins

2015-12-03 Thread Ofir Herzas
load_only as stated in http://docs.sqlalchemy.org/en/latest/orm/loading_columns.html does the following: "An arbitrary set of columns can be selected as “load only” columns, which will be loaded *while deferring all other columns* on a given entity..." However, joined relationships are not

[sqlalchemy] firebird3 support

2015-12-03 Thread Treeve Jelbert
I have been using sqlalchemy with firebird3 for some time on a small project. Now that Firbeird3 has reached RC2 status, I think it may be appropriate to submit the attached patches which are based on the rel_1_0 git branch. I use the fdb-1.4.9 driver Regards, Treeve -- You received this

Re: [sqlalchemy] Bulk insert using bulk_insert_mappings

2015-12-03 Thread Mike Bayer
On 12/03/2015 11:28 AM, Horcle wrote: > I am trying to do a bulk insert of a large list of dictionaries of the form: > > results = [{'attribute': u'SEX', 'value_d': 0.0, 'value_s': u'M', > 'sid': 1L}, >{'attribute': u'SEX', 'value_d': 0.0, 'value_s': u'M', > 'sid': 2L}, >

Re: [sqlalchemy] Re: load_only doesn't affect joins

2015-12-03 Thread Ofir Herzas
Thanks for caring ;) On Dec 3, 2015 6:08 PM, "Jonathan Vanasco" wrote: > Thanks for posting a full self-contained working example of your problem! > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sqlalchemy" group. > To

Re: [sqlalchemy] Bulk insert using bulk_insert_mappings

2015-12-03 Thread Horcle
Sweet! It was the commit. Thanks! Greg-- On Thursday, December 3, 2015 at 10:48:45 AM UTC-6, Michael Bayer wrote: > > > > On 12/03/2015 11:28 AM, Horcle wrote: > > I am trying to do a bulk insert of a large list of dictionaries of the > form: > > > > results = [{'attribute': u'SEX',

[sqlalchemy] Bulk insert using bulk_insert_mappings

2015-12-03 Thread Horcle
I am trying to do a bulk insert of a large list of dictionaries of the form: results = [{'attribute': u'SEX', 'value_d': 0.0, 'value_s': u'M', 'sid': 1L}, {'attribute': u'SEX', 'value_d': 0.0, 'value_s': u'M', 'sid': 2L}, {'attribute': u'SEX', 'value_d': 0.0,

Re: [sqlalchemy] Insert new column in an existing database

2015-12-03 Thread Mike Bayer
hello - you need to use the SQLAlchemy API fully, the code example below is using the SQLite DBAPI directly. Go through the tutorial at http://docs.sqlalchemy.org/en/rel_1_0/core/tutorial.html to see how to properly invoke SQL with SQLAlchemy. On 12/03/2015 12:19 AM, Jothybasu Selvaraj

[sqlalchemy] Re: load_only doesn't affect joins

2015-12-03 Thread Jonathan Vanasco
Thanks for posting a full self-contained working example of your problem! -- 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 sqlalchemy+unsubscr...@googlegroups.com.

Re: [sqlalchemy] load_only doesn't affect joins

2015-12-03 Thread Mike Bayer
On 12/03/2015 10:08 AM, Mike Bayer wrote: > > > On 12/03/2015 06:16 AM, Ofir Herzas wrote: >> load_only as stated >> in http://docs.sqlalchemy.org/en/latest/orm/loading_columns.html does >> the following: >> "An arbitrary set of columns can be selected as “load only” columns, >> which will be

Re: [sqlalchemy] load_only doesn't affect joins

2015-12-03 Thread Mike Bayer
On 12/03/2015 06:16 AM, Ofir Herzas wrote: > load_only as stated > in http://docs.sqlalchemy.org/en/latest/orm/loading_columns.html does > the following: > "An arbitrary set of columns can be selected as “load only” columns, > which will be loaded *while deferring all other columns* on a given >

Re: [sqlalchemy] load_only doesn't affect joins

2015-12-03 Thread Ofir Herzas
The lazy me you mean :) I saw that option in the documents and my comment was not regarding the complexity of the solution. I just thought that a 'load_only' method is better understood if it loads only the specified attributes. With an abstraction layer, the user often "sees" things

Re: [sqlalchemy] firebird3 support

2015-12-03 Thread Mike Bayer
Hi Treeve - these look pretty good, is there any chance you can submit as a single patch to https://github.com/zzzeek/sqlalchemy/pulls, and additionally what are the results when you've run the tests? - mike On 12/03/2015 04:27 AM, Treeve Jelbert wrote: > I have been using sqlalchemy with

Re: [sqlalchemy] Insert new column in an existing database

2015-12-03 Thread Jothybasu Selvaraj
Thanks, I will give it a try. Cheers Jothy On Fri, Dec 4, 2015 at 3:49 AM, Mike Bayer wrote: > > hello - > > you need to use the SQLAlchemy API fully, the code example below is > using the SQLite DBAPI directly. > > Go through the tutorial at >