Re: [sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-09 Thread eli rashlin
that's pretty much it. session_schema is basically what session_shardid is in the recipe. On 6/7/15 6:33 AM, eli rashlin wrote: Hi Michael, can you help me with the recipe I'm confuce on how to use it (I'm sorry but I'm probably still a newbie) -- You received this message

Re: [sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-07 Thread eli rashlin
Hi Michael, can you help me with the recipe I'm confuce on how to use it (I'm sorry but I'm probably still a newbie) -- 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

Re: [sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-04 Thread eli rashlin
Thank you so much Mike - I'll try it right away :) -- 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. To post to this group,

Re: [sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-04 Thread eli rashlin
Thank you Michal. I will try to install the patch, It might be a bit problematic as my sqlalchemy version is quite old (0.6.8) and the patch seems to be built for version 0.9 and up. Worst case scenario I can write down the queries by myself and concat the schema name -- You received this

[sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-04 Thread eli rashlin
)() row = engine.query(Messages).first() but i don't understand how to make it work... On Tuesday, June 2, 2015 at 12:52:22 PM UTC+3, eli rashlin wrote: Hi, I have a very strange behavior, I have a program that uses bulk insertions to the DB. for some reason the process which iterate on one

[sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-04 Thread eli rashlin
Thank you. I tried the method described here https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/EntityName, my tables are defined as modules but I'm unable to understand how he does it those are my classes GlobBase.py: from sqlalchemy.ext.declarative import declarative_base from

[sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-04 Thread eli rashlin
yes but the schema is different for each run, I dont want it to be hard coded into the table definition. On Tuesday, June 2, 2015 at 12:52:22 PM UTC+3, eli rashlin wrote: Hi, I have a very strange behavior, I have a program that uses bulk insertions to the DB. for some reason

Re: [sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-03 Thread eli rashlin
Thank you Michael for your answer. How can I use the schema in a query object, is there a way to do it? On Tuesday, June 2, 2015 at 6:26:43 PM UTC+3, Michael Bayer wrote: On 6/2/15 5:54 AM, eli rashlin wrote: BTW is there a way in sqlalchemy to append the name of the database

[sqlalchemy] Re: getting 'No database selected' randomly from session

2015-06-02 Thread eli rashlin
BTW is there a way in sqlalchemy to append the name of the database to the table name like SELECT * from dbname.table_name -- 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

[sqlalchemy] getting 'No database selected' randomly from session

2015-06-02 Thread eli rashlin
Hi, I have a very strange behavior, I have a program that uses bulk insertions to the DB. for some reason the process which iterate on one table and create bulk and insert into another table fails with the error of 'No database selected'. this is how I bind the session:

Re: [sqlalchemy] How do we define a relationship in sqlalchemy for a innodb file without actually creating the FK

2015-02-24 Thread eli rashlin
#querying-with-joins Hope that helps, Simon On Tue, Feb 24, 2015 at 7:56 AM, eli rashlin eli.r...@gmail.com javascript: wrote: Thanks Simon for your replay. when I'm removing the FK definition from the Column - The tables are being built as they should - the ptoblem is when i try

[sqlalchemy] How do we define a relationship in sqlalchemy for a innodb file without actually creating the FK

2015-02-23 Thread eli rashlin
I have a table which i have changed the Engine from Myisam to InnoDB, This is the only table that has been changed, there are other tables that are in relation with this table of 1:N class Signals(Base, sql_functions): __tablename__ = 'Signals' def __init__(self, message_id=None,