Re: [sqlalchemy] sqlite and max_overflow
Thanks for the tip, Michael, I'm going to see how to manage with this keyword (because I'm not specify such parameter, but probable is turbogears who uses it by default). j Michael Bayer wrote: you can't use max_overflow with the default connection pool used by the SQLite engine, remove that keyword. On May 27, 2013, at 7:17 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com wrote: I have not been able to solve the problem can someone please help me? ... database.bind_meta_data() File /home/jose/buildout/eggs/TurboGears-1.1.3-py2.6.egg/turbogears/database.py, line 73, in bind_metadata metadata.bind = sqlalchemy.create_engine(dburi, **alch_args) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/__init__.py, line 263, in create_engine return strategy.create(*args, **kwargs) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/strategies.py, line 134, in create engineclass.__name__)) TypeError: Invalid argument(s) 'max_overflow' sent to create_engine(), using configuration SQLiteDialect_pysqlite/SingletonThreadPool/Engine. Please check that the keyword arguments are appropriate for this combination of components. j -- 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 mailto:sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com mailto:sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jose Soares Da Silva _/_/ Sferacarta Net Via Bazzanese 69 _/_/_/_/_/ 40033 Casalecchio di Reno _/_/ _/_/ _/_/ Bologna - Italy _/_/ _/_/ _/_/ Ph +39051591054 _/_/ _/_/ _/_/ _/_/ fax +390516131537_/_/ _/_/ _/_/ _/_/ web:www.sferacarta.com_/_/_/ _/_/_/ Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono riservate e, comunque, destinate esclusivamente alla persona o ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza, l’integrità e la sicurezza della presente mail non possono essere garantite. Se avete ricevuto questa mail per errore, Vi preghiamo di contattarci immediatamente e di eliminarla. Grazie. This communication is intended only for use by the addressee, pursuant to legislative decree 30 June 2003, n. 196. It may contain confidential or privileged information. You should not copy or use it to disclose its contents to any other person. Transmission cannot be guaranteed to be error-free, complete and secure. If you are not the intended recipient and receive this communication unintentionally, please inform us immediately and then delete this message from your system. Thank you. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sqlalchemy] sqlite and max_overflow
I think turbogears is loading your sqlalchemy parameters from a config file (dev.cfg perhaps?). You should look for a line of the form sqlalchemy.max_overflow = X and delete it. Hope that helps, Simon On Tue, May 28, 2013 at 10:34 AM, jo jose.soa...@sferacarta.com wrote: Thanks for the tip, Michael, I'm going to see how to manage with this keyword (because I'm not specify such parameter, but probable is turbogears who uses it by default). j Michael Bayer wrote: you can't use max_overflow with the default connection pool used by the SQLite engine, remove that keyword. On May 27, 2013, at 7:17 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com wrote: I have not been able to solve the problem can someone please help me? ... database.bind_meta_data() File /home/jose/buildout/eggs/TurboGears-1.1.3-py2.6.egg/turbogears/database.py, line 73, in bind_metadata metadata.bind = sqlalchemy.create_engine(dburi, **alch_args) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/__init__.py, line 263, in create_engine return strategy.create(*args, **kwargs) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/strategies.py, line 134, in create engineclass.__name__)) TypeError: Invalid argument(s) 'max_overflow' sent to create_engine(), using configuration SQLiteDialect_pysqlite/SingletonThreadPool/Engine. Please check that the keyword arguments are appropriate for this combination of components. j -- 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 mailto:sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com mailto:sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jose Soares Da Silva _/_/ Sferacarta Net Via Bazzanese 69 _/_/_/_/_/ 40033 Casalecchio di Reno _/_/ _/_/ _/_/ Bologna - Italy _/_/ _/_/ _/_/ Ph +39051591054 _/_/ _/_/ _/_/ _/_/ fax +390516131537_/_/ _/_/ _/_/ _/_/ web:www.sferacarta.com_/_/_/ _/_/_/ Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono riservate e, comunque, destinate esclusivamente alla persona o ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza, l’integrità e la sicurezza della presente mail non possono essere garantite. Se avete ricevuto questa mail per errore, Vi preghiamo di contattarci immediatamente e di eliminarla. Grazie. This communication is intended only for use by the addressee, pursuant to legislative decree 30 June 2003, n. 196. It may contain confidential or privileged information. You should not copy or use it to disclose its contents to any other person. Transmission cannot be guaranteed to be error-free, complete and secure. If you are not the intended recipient and receive this communication unintentionally, please inform us immediately and then delete this message from your system. Thank you. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sqlalchemy] implementing implicit scalar collections
Hi Mike, On 05/25/13 17:59, Michael Bayer wrote: Your primary key is far from useless. If your collection consists of unique values, then that's your primary key. If your collection consists of non-unique values, but are unique to their parent, then again, that's your primary key (a composite). If your collection consists of non-unique values within a single parent, then you can't manipulate that data correctly since you can't target individual rows. OK, just wanted to make sure. In that case, it'd be best to store an array of primitives as native postgres ARRAY objects if one wants to trade off the overhead of primary keys for the overhead of re-writing the whole array on every update. Another feature request for Spyne, I guess :) So its simple and straightforward just to map to that primary key. SQLAlchemy could someday provide some out of the box system that does the mapping and association proxy for you but it's really not that big a deal to automate this yourself. I guess I've already done that automation. I do create the table, the mapping and the association proxy automatically. Thank you for your response. Best, Burak -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sqlalchemy] sqlite and max_overflow
Yes, you are right, Simon, I found it in app.cfg as: sqlalchemy.max_overflow=40 # Bumped up from 10 sqlalchemy.pool_size=10# default thanks a lot. j Simon King wrote: I think turbogears is loading your sqlalchemy parameters from a config file (dev.cfg perhaps?). You should look for a line of the form sqlalchemy.max_overflow = X and delete it. Hope that helps, Simon On Tue, May 28, 2013 at 10:34 AM, jo jose.soa...@sferacarta.com wrote: Thanks for the tip, Michael, I'm going to see how to manage with this keyword (because I'm not specify such parameter, but probable is turbogears who uses it by default). j Michael Bayer wrote: you can't use max_overflow with the default connection pool used by the SQLite engine, remove that keyword. On May 27, 2013, at 7:17 AM, jo jose.soa...@sferacarta.com mailto:jose.soa...@sferacarta.com wrote: I have not been able to solve the problem can someone please help me? ... database.bind_meta_data() File /home/jose/buildout/eggs/TurboGears-1.1.3-py2.6.egg/turbogears/database.py, line 73, in bind_metadata metadata.bind = sqlalchemy.create_engine(dburi, **alch_args) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/__init__.py, line 263, in create_engine return strategy.create(*args, **kwargs) File /home/jose/buildout/eggs/SQLAlchemy-0.6.8-py2.6.egg/sqlalchemy/engine/strategies.py, line 134, in create engineclass.__name__)) TypeError: Invalid argument(s) 'max_overflow' sent to create_engine(), using configuration SQLiteDialect_pysqlite/SingletonThreadPool/Engine. Please check that the keyword arguments are appropriate for this combination of components. j -- 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 mailto:sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com mailto:sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jose Soares Da Silva _/_/ Sferacarta Net Via Bazzanese 69 _/_/_/_/_/ 40033 Casalecchio di Reno _/_/ _/_/ _/_/ Bologna - Italy _/_/ _/_/ _/_/ Ph +39051591054 _/_/ _/_/ _/_/ _/_/ fax +390516131537_/_/ _/_/ _/_/ _/_/ web:www.sferacarta.com_/_/_/ _/_/_/ Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono riservate e, comunque, destinate esclusivamente alla persona o ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza, l’integrità e la sicurezza della presente mail non possono essere garantite. Se avete ricevuto questa mail per errore, Vi preghiamo di contattarci immediatamente e di eliminarla. Grazie. This communication is intended only for use by the addressee, pursuant to legislative decree 30 June 2003, n. 196. It may contain confidential or privileged information. You should not copy or use it to disclose its contents to any other person. Transmission cannot be guaranteed to be error-free, complete and secure. If you are not the intended recipient and receive this communication unintentionally, please inform us immediately and then delete this message from your system. Thank you. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Jose Soares Da Silva _/_/ Sferacarta Net Via Bazzanese 69 _/_/_/_/_/ 40033 Casalecchio di Reno _/_/ _/_/ _/_/ Bologna - Italy _/_/ _/_/ _/_/ Ph +39051591054 _/_/ _/_/ _/_/ _/_/ fax +390516131537_/_/ _/_/ _/_/ _/_/ web:www.sferacarta.com_/_/_/ _/_/_/ Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono riservate e, comunque,
[sqlalchemy] trouble with postgresql ANY
I'm having difficulty using PostgreSQL's ANY operator (for use with arrays). I've tried several variations of the syntax provided in the documentation, but all I ever get is: AttributeError: 'SQLCompiler' object has no attribute 'visit_any' What am I likely doing wrong? I've tried (using declarative-derived mappers): print sess.query(ObjectA, dialects.postgresql.Any(ObjectA.column1, ObjectB.column1)) and print dialects.postgresql.Any(ObjectA.column1, ObjectB.column1) and print ObjectB.column1.any(ObjectA.column1) I am declaring ObjectB.column1 as an ARRAY(Integer()) and ObjectA.column1 is an Integer(). -- Jon Software Blacksmith -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sqlalchemy] trouble with postgresql ANY
printing a SQL construct invokes the default dialect which doesn't support Postgresql operators, use compile() for stringification: from sqlalchemy.dialects import postgresql dialect = postgresql.dialect() print stmt.compile(dialect=dialect) On May 28, 2013, at 10:23 AM, Jon Nelson jnel...@jamponi.net wrote: I'm having difficulty using PostgreSQL's ANY operator (for use with arrays). I've tried several variations of the syntax provided in the documentation, but all I ever get is: AttributeError: 'SQLCompiler' object has no attribute 'visit_any' What am I likely doing wrong? I've tried (using declarative-derived mappers): print sess.query(ObjectA, dialects.postgresql.Any(ObjectA.column1, ObjectB.column1)) and print dialects.postgresql.Any(ObjectA.column1, ObjectB.column1) and print ObjectB.column1.any(ObjectA.column1) I am declaring ObjectB.column1 as an ARRAY(Integer()) and ObjectA.column1 is an Integer(). -- Jon Software Blacksmith -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sqlalchemy] storage in disk
hi all, why the storage of monetdb in the disk is 64-B-tree, is there some advantages using this method? -- 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, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.