Re: [sqlalchemy] database operation fails after succsefull multi-processing.

2022-08-23 Thread Geert Jan Talens
37c43ed000) > libz.so.1 => /lib64/libz.so.1 (0x7f37c43d3000) > libssl.so.1.1 => /lib64/libssl.so.1.1 (0x7f37c4336000) > libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x7f37c4048000) > /lib64/ld-linux-x86-64.so.2 (0x7f37c467f000) > 0 > > >

Re: [sqlalchemy] database operation fails after succsefull multi-processing.

2022-08-23 Thread Geert Jan Talens
What server version ? > > On Tue, Aug 23, 2022, at 11:22 AM, Geert Jan Talens wrote: > > Hello Mike, > > Thank you for your reply. The traceback of the issue is below. I'm using > sqlalchemy 1.4.40 and MySQLdb 2.1.1, the problem does not occur when using > sqlite for the

Re: [sqlalchemy] database operation fails after succsefull multi-processing.

2022-08-23 Thread Geert Jan Talens
Hello Mike, Thank you for your reply. The traceback of the issue is below. I'm using sqlalchemy 1.4.40 and MySQLdb 2.1.1, the problem does not occur when using sqlite for the database instead. Regards, Geert Jan Traceback (most recent call last): File "/home/talens/anaconda3/envs/hatp

[sqlalchemy] database operation fails after succsefull multi-processing.

2022-08-22 Thread Geert Jan Talens
having, where the success of line 3 (in main) for some reason depends on what happens on line 1. Any help would be appreciated! Regards, Geert Jan from sqlalchemy import create_engine, select from sqlalchemy import Column, Integer from sqlalchemy.orm import declarative_base, sessionmaker import

Re: [sqlalchemy] Pickle of result from query with explicit sqlalchemy.orm.Load() option

2019-08-26 Thread Jan Wegger
Awesome, thanks! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this

Re: [sqlalchemy] Pickle of result from query with explicit sqlalchemy.orm.Load() option

2019-08-26 Thread Jan Wegger
Ok, thanks for the reply. My original case was a situation where it seemed hard to get it right without using Load() directly, but I think I've been able to work around it now, and it didn't turn out too bad, so it's no big deal for me then. Thanks again for a great library! -- SQLAlchemy -

[sqlalchemy] Pickle of result from query with explicit sqlalchemy.orm.Load() option

2019-08-26 Thread Jan Wegger
, but below I use 'sqlite:///:memory:' to keep it simple. The error output is not exactly the same, but I'm guessing that's not essential since the overall problem is the same. Thanks and best regards, Jan Wegger Starting with a clean virtualenv and just sqlalchemy installed: $ python Python

Re: [sqlalchemy] delete not working on fk relation: sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails

2019-05-15 Thread Jan Sakalos
eTime()) Thanks Jano On Tue, May 14, 2019 at 10:39 PM Jan Sakalos wrote: > Hello, > > i am unable to delete ReportModel entry, because of: > > sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1451, 'Cannot > delete or update a parent row: a foreign key constra

[sqlalchemy] delete not working on fk relation: sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails

2019-05-14 Thread Jan Sakalos
Hello, i am unable to delete ReportModel entry, because of: sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`qualys_guard`.`report_server2patch`, CONSTRAINT `report_server2patch_ibfk_3` FOREIGN KEY

Re: [sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Jan Sakalos
) > > the association proxy should raise for this condition, e.g. pointing > it to itself. > > > On Thu, Apr 25, 2019 at 11:00 AM Mike Bayer > wrote: > > > > On Thu, Apr 25, 2019 at 8:34 AM Jan Sakalos wrote: > > > > > > Hello, > &g

[sqlalchemy] association proxy through composite key relation not working as expected. "KeyError: 'request_server'"

2019-04-25 Thread Jan Sakalos
Hello, I have to association proxies in code one is working and other not. I went through it many times and wasnt able to identify issue. Also please can you give me advice how to debug such issues if there is any? Thanks Jano code: from sqlalchemy import Column, Integer, String, ForeignKey,

Re: [sqlalchemy] How to reload data from table/all tables using sqlalchemy ORM?

2019-04-24 Thread Jan Sakalos
e a message > queue. Databases can be used as message queues, but you need to > understand the implications if you are going to do that. > > Simon > > On Tue, Apr 23, 2019 at 10:53 AM Jan Sakalos wrote: > > > > Hi, > > > > API will add rows to table and main loo

Re: [sqlalchemy] How to reload data from table/all tables using sqlalchemy ORM?

2019-04-23 Thread Jan Sakalos
On Tue, Apr 23, 2019 at 10:17 AM Simon King wrote: > On Mon, Apr 22, 2019 at 5:09 PM Jan Sakalos wrote: > > > > Hello, > > > > How to reload data from table/all tables using sqlalchemy ORM? > > > > Thanks > > Jano > > > > Hi, > > Can yo

[sqlalchemy] How to reload data from table/all tables using sqlalchemy ORM?

2019-04-22 Thread Jan Sakalos
Hello, How to reload data from table/all tables using sqlalchemy ORM? Thanks Jano -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See

Re: [sqlalchemy] One-to-many relationship between two subclasses with foreign key in parent classes

2019-03-24 Thread Jan Dalheimer
s that are are not a subclass of MembershipType. > > >> >> I believe that composite secondary joins are most likely what I need, but do >> not fully understand it and have therefore not been able to adapt it. >> >> I'm using SQLAlchemy 1.3.1 with both SQLite

[sqlalchemy] ORM instance custom method excuted in new thread.

2019-02-21 Thread Jan Sakalos
M intances to threads? Thanks Jan -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- Yo

[sqlalchemy] Re: SQLAlchemy does not always generate sequence for primary key field

2015-02-22 Thread Jan Murre
Seems that the difference in in the support for the smallserial datatype. This is not available for postgres 9.1.13: http://www.postgresql.org/docs/9.1/static/datatype-numeric.html Op zondag 22 februari 2015 09:23:38 UTC+1 schreef Jan Murre: I have the following model: class GeoLocation

[sqlalchemy] SQLAlchemy does not always generate sequence for primary key field

2015-02-22 Thread Jan Murre
I have the following model: class GeoLocation(Base): __tablename__ = geolocations id = Column(SmallInteger, primary_key=True) name = Column(String(8), nullable=False) coordinates = Column(String(80), nullable=False) Using SQLAlchemy 0.9.8 and postgresql 9.3.6 it

[sqlalchemy] How Do I improve performance for inserts.

2013-02-15 Thread Jan Palach
Hi everyone, first of all sorry my english :), this is my first email in this mainlist. My name is Jan Palach I'm from Brazil and i'm novice in SQLALchemy ecosystem. I'm testing the combination PostgreSQL + SQLAlchemy(using psycopg2) and CPython 2.x, to create a database layer for backend

Re: [sqlalchemy] How Do I improve performance for inserts.

2013-02-15 Thread Jan Palach
Thanks Mr. Michael, I will make changes in my code to reflect your tips and I will analyse the results. Thanks a lot. Att, Jan Palach -- See my linkedin: http://www.linkedin.com/pub/jan-palach/16/b1a/7a3 On Feb 15, 2013, at 1:11 PM, Michael Bayer mike...@zzzcomputing.com

[sqlalchemy] enable_load_extension problem

2012-03-16 Thread Jan
of connection to the database). Any help would be appreciated. Many thanks in advance. Best wishes, Jan -- Here is a small example using sqlalchemy: from sqlalchemy import

[sqlalchemy] sqlalchemy-migrate 0.7.2 released

2011-11-01 Thread Jan Dittberner
reporters and people giving valuable feedback to the migrate-users list and in #sqlalchemy-migrate on IRC. Best Regards, Jan Dittberner [1] http://code.google.com/p/sqlalchemy-migrate/ [2] http://readthedocs.org/docs/sqlalchemy-migrate/en/v0.7.2/ [3] http://groups.google.com/group/migrate-users/msg

[sqlalchemy] Users of sqlalchemy-migrate

2011-10-30 Thread Jan Dittberner
to your project on our project page and in our documentation. Please send a short description of your project and a link to me or the the migrate-users list [5]. Kind regards, Jan Dittberner [1] http://sqlalchemy-migrate.googlecode.com/ [2] http://sqlalchemy.org [3] http://turbogears.org/2.0/docs

Re: [sqlalchemy] declarative_base and migration question

2011-06-04 Thread Jan Dittberner
get some more ideas from the migrate-users group (added to discussion). Regards Jan Dittberner 2011/6/4 Ryu Ishimoto r...@midokura.jp: Hi, I just recently started looking into using sqlalchemy migration, and I'm having difficulty understanding how it works with declarative_base.  The problem

[sqlalchemy] sqlalchemy-migrate 0.7 released

2011-05-27 Thread Jan Dittberner
] http://pypi.python.org/pypi/sqlalchemy-migrate [3] http://code.google.com/p/sqlalchemy-migrate/wiki/Development Regards Jan Dittberner -- Jan Dittberner - Debian Developer GPG-key: 4096R/558FB8DD 2009-05-10 B2FF 1D95 CE8F 7A22 DF4C F09B A73E 0055 558F B8DD http://www.dittberner.info

[sqlalchemy] sqlalchemy-migrate 0.7.1 released

2011-05-27 Thread Jan Dittberner
/sqlalchemy-migrate Regards Jan Dittberner -- Jan Dittberner - Debian Developer GPG-key: 4096R/558FB8DD 2009-05-10 B2FF 1D95 CE8F 7A22 DF4C F09B A73E 0055 558F B8DD http://www.dittberner.info/ signature.asc Description: Digital signature

[sqlalchemy] help wanted: porting sqlalchemy-migrate for SQLAlchemy 0.7 and sqlalchemy-migrate maintenance

2011-05-26 Thread Jan Dittberner
/sqlalchemy-migrate-all/ [3] http://code.google.com/p/sqlalchemy-migrate/source/browse/migrate/tests/changeset/test_changeset.py#160 [4] http://code.google.com/p/sqlalchemy-migrate/source/browse/migrate/changeset/ansisql.py#87 [5] http://code.google.com/p/sqlalchemy-migrate/issues/list Regards Jan

Re: [sqlalchemy] help wanted: porting sqlalchemy-migrate for SQLAlchemy 0.7 and sqlalchemy-migrate maintenance

2011-05-26 Thread Jan Dittberner
2011/5/26 Michael Bayer mike...@zzzcomputing.com: On May 26, 2011, at 11:41 AM, Jan Dittberner wrote: Hello, I work on making sqlalchemy-migrate [1] work with SQLAlchemy 0.7. I fixed all broken unit tests except for one related to adding a new column with a foreign key to an existing table

Re: [sqlalchemy] how to use version_id_col

2011-01-18 Thread Jan Mueller
On 01/18/2011 02:08 AM, Michael Bayer wrote: On Jan 17, 2011, at 5:42 PM, Jan Mueller wrote: try: obj = Session.query(MyObject).filter(MyObject.updated_at == my_hidden_updated_at).filter(MyObject.id == id).one() except orm.exc.NoResultFound

Re: [sqlalchemy] Re: INSERT RETURNING question

2011-01-18 Thread Jan Mueller
to find the information in the doc. Doing just_inserted_obj.id causes a SELECT ... WHERE id= query, which I'd like to avoid. Hey there, i am just guessing a little bit... maybe you need to set the following? sessionmaker(expire_on_commit=False) -- Greetings Jan Müller -- You received

Re: [sqlalchemy] how to use version_id_col

2011-01-17 Thread Jan Mueller
On 01/17/2011 05:14 PM, Michael Bayer wrote: On Jan 16, 2011, at 8:15 PM, Jan Mueller wrote: Ok then i will try to explain it: I have a pylons web application... and i want to use the entity attribute updated_at as a Datetime version_id... so i modified the entity with the mapper args

[sqlalchemy] sqla and sqlite3

2011-01-17 Thread Jan Mueller
the object again, in order to continue the process... why isn't the rollback implicit when this error occurs? i think it is not possible to retry the commit, is it? if i remember correctly this throws a new exception -- Greetings Jan Müller -- You received this message because you are subscribed

[sqlalchemy] Re: sqlalchemy rocks my socks off!

2011-01-16 Thread Jan Müller
+1 On Jan 15, 9:58 am, Eric Ongerth ericonge...@gmail.com wrote: +1 On Jan 13, 5:08 pm, rdlowrey rdlow...@gmail.com wrote: To Michael Bayer: sqlalchemy simplifies my life every day and makes me vastly more productive! Many thanks. -- You received this message because you

[sqlalchemy] how to use version_id_col

2011-01-16 Thread Jan Mueller
... Greetings Jan -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group

Re: [sqlalchemy] how to use version_id_col

2011-01-16 Thread Jan Mueller
I switched to 0.6.3 and version_id_col works... just like i expected... that's really odd... i guess i will stay at this version and everything will be fine ;-) thank you very much. and sorry for the lacky explanation of my problem. Greetings Jan -- You received this message because you

Re: [sqlalchemy] how to use version_id_col

2011-01-16 Thread Jan Mueller
behavior... but i thought... just in case ;-) so ... these are my thoughts about version_id_col ... it works really fine now... with 0.6.3 ;-) and thanks for the great orm :) Greetings Jan On 01/17/2011 01:17 AM, Michael Bayer wrote: if there's a bug in version_id_col I'd really like to know

[sqlalchemy] Re: Adding expressions to a Query

2010-12-05 Thread Jurie-Jan Botha
one option would be to add the expression to your model as a column_property This is unfortunately not an option as this extra column compiles it's value from the values of more than one model. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Re: Adding expressions to a Query

2010-12-05 Thread Jurie-Jan Botha
I found that it's really as easy as using query.add_columns(). My problem was caused by my not reading the documentation properly and trying to use a list in the add_columns() method instead of just positional arguments. one option would be to add the expression to your model as a

[sqlalchemy] Excluding a column form Query result

2010-12-05 Thread Jurie-Jan Botha
Is there a way to add a column to a Query object to be used elsewhere in the query, but prevent it from being listed in the result of the Query? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Adding expressions to a Query

2010-12-03 Thread Jurie-Jan Botha
I can't seem to find a way to add an expression to an ORM Query as a column. I need to add it after the Query object is initialized. The expressions that I'm trying to add is a function like 'func.ts_rank_cd'. Thanks in advance. -- You received this message because you are subscribed to the

[sqlalchemy] sqlalchemy-migrate 0.6 release

2010-07-11 Thread Jan Dittberner
/sqlalchemy-migrate/downloads/list [4] http://packages.debian.org/sid/python-migrate [5] http://packages.python.org/sqlalchemy-migrate/ [6] http://groups.google.com/group/migrate-users [7] http://code.google.com/p/sqlalchemy-migrate/issues/list Regards Jan Dittberner signature.asc Description

[sqlalchemy] Re: Creating Custom SQL

2010-06-04 Thread Jan-Eric
Thank you for your reply. Is this available for version 0.6 only ? On Jun 3, 5:41 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jun 3, 2010, at 5:06 AM, Jan-Eric wrote: Hi! I have a problem with constructing a custom SQL statement. I would like to create the following SQL

[sqlalchemy] Creating Custom SQL

2010-06-03 Thread Jan-Eric
in advance! Jan-Eric -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit

[sqlalchemy] Finding syntax errors in very large sql statements

2010-05-15 Thread Jan-Eric
in advance, Jan-Eric Duden -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit

[sqlalchemy] Re: Finding syntax errors in very large sql statements

2010-05-15 Thread Jan-Eric
statement in a time efficient manner is for me impossible. The only way for me to understand the select statement is reading the sqlalchemy python that constructs the statement - which unfortunately doesn't help me with missing aliases or so. Thanks, Jan-Eric Duden On May 15, 4:50 pm, Michael

[sqlalchemy] INTERVAL 1 DAY in ORM

2009-01-25 Thread Jan Koprowski
Hi ! I get some query: DELETE FROM passwordrequest WHERE requested_at = (NOW() - INTERVAL 1 DAY) which delete all requests older then one day. How can I get this effect in SQLAlchemy ? Greetings from Poland Jan Koprowski --~--~-~--~~~---~--~~ You received

[sqlalchemy] reviving migrate

2007-09-09 Thread Jan Dittberner
). Maybe I could find some time to look at the existing code and create a version that works with current SA. Is someone here with a better insight on what is broken in migrate now, to get me started? Regards Jan Dittberner --~--~-~--~~~---~--~~ You received

[sqlalchemy] reviving migrate

2007-09-09 Thread Jan Dittberner
). Maybe I could find some time to look at the existing code and create a version that works with current SA. Is someone here with a better insight on what is broken in migrate now, to get me started? Regards Jan Dittberner --~--~-~--~~~---~--~~ You received