[sqlalchemy] TLS 1.2

2023-03-27 Thread Patrick Bruce
I am connecting to a MySQL db using sqlalchemy and TLS 1.2 is enforced server side. I connect by setting my URI to the correct connection string and adding the ?ssl=true flag at the end. However I am getting an error that the TLS version does not meet the minimum requirements of the server. My

Re: many to many relation with foreign key to composite primary key

2018-12-14 Thread patrick payet
e] {} > INFO [sqlalchemy.engine.base.Engine] > CREATE TABLE users_permissions ( > users_id BIGINT NOT NULL, > permissions_id BIGINT NOT NULL, > PRIMARY KEY (users_id, permissions_id), > FOREIGN KEY(permissions_id) REFERENCES permissions (id), > FOREIGN KE

Re: many to many relation with foreign key to composite primary key

2018-12-13 Thread patrick payet
), FOREIGN KEY(permissions_id) REFERENCES permissions (id) ) My mistake is to have mixed in my mind the information of the object mapping and the relational constraints of the database. But why Alembic can’t create this model in auto-generation mode? Best regards Le jeu. 13 déc. 2018 à 18:12, patrick

Re: many to many relation with foreign key to composite primary key

2018-12-13 Thread patrick payet
previously ( there is no unique constraint matching given keys for referenced table "users_roles"). I will send you the CREATE TABLE statements by email in a moment. Best regards, Patrick Le mer. 12 déc. 2018 à 19:40, Mike Bayer a écrit : > On Wed, Dec 12, 2018 at 1:01 PM patrick payet wro

many to many relation with foreign key to composite primary key

2018-12-12 Thread patrick payet
I had a SQLAlchemy model like - class User(DeclarativeBase): __tablename__ = 'users' id = Column(BigInteger, primary_key=True) email = Column(String(100), unique=True, nullable=False) name = Column(String(100), nullable=False) hashed_password = Column(String(100),

[sqlalchemy] pandas read_csv returning "nan" - sqlalchemy inserting "~"

2017-05-31 Thread Patrick Diver
For some reason Pandas is returning NULL values from Oracle into "nan" instead of "NaN" or "None" so I have to check for this and change it to "None" or else SQLAlchemy inserts a "~" instead of NULL to my Oracle database. What's up with that? Anybody else have this happen? if

Re: [sqlalchemy] Updates in after_flush_postexec

2015-11-09 Thread Patrick Lewis
On Monday, November 9, 2015 at 1:50:36 PM UTC-8, Michael Bayer wrote: > > On 11/09/2015 03:10 PM, Patrick Lewis wrote: > > > Is this an issue, or am I misunderstanding the doc? > > the documentation was ambiguous. I have corrected the paragraph as > follows: > &

[sqlalchemy] Updates in after_flush_postexec

2015-11-09 Thread Patrick Lewis
Engine INSERT INTO person (name) VALUES (?) 2015-11-09 20:00:30,045 INFO sqlalchemy.engine.base.Engine ('P Body',) In handler, p: session.dirty: IdentitySet([]) session.info: {'RENAMED': True} Is this an issue, or am I misunderstanding the doc? Thanks, Patrick -- You received this m

[sqlalchemy] relation auto-correlation

2010-04-12 Thread patrick
manually. -- Patrick -- 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: insert defaults

2010-03-25 Thread patrick
, patrick wrote: Well it's something between the two.  The instance variable compressed will always be NULL when adding or updating an instance, but I want it to infer a value from another instance variable.  When inserting... the value of 'compressed' in the sql statement needs to be the raw SQL

[sqlalchemy] Re: insert defaults

2010-03-25 Thread patrick
Yes, but then my descriptor is washed away. I'm trying to make it like a column property on 'get' and a descriptor enabled property on 'set'. On Mar 25, 3:27 pm, Michael Bayer mike...@zzzcomputing.com wrote: patrick wrote: In the past I assigned Matrix.text=column_property(select

[sqlalchemy] Re: insert defaults

2010-03-05 Thread patrick
Bayer mike...@zzzcomputing.com wrote: patrick wrote: Hey,   I'm trying to create dynamic defaults for columns ala http:// www.sqlalchemy.org/docs/metadata.html#context-sensitive-default-funct MySQL has COMPRESS and UNCOMPRESS functions that I'm trying to leverage.  I don't want

[sqlalchemy] insert defaults

2010-03-04 Thread patrick
Hey, I'm trying to create dynamic defaults for columns ala http:// www.sqlalchemy.org/docs/metadata.html#context-sensitive-default-functions. MySQL has COMPRESS and UNCOMPRESS functions that I'm trying to leverage. I don't want to compress with python's zlib because I have legacy tables that

[sqlalchemy] Noob WARNING, sqlalchemy for Desktop Apps?

2008-10-28 Thread Patrick
I am just learning the basics of Sqlalchemy, I am reading through the O'Reilly book. I was just wondering if anyone is using Sqlalchemy for desktop applications? Does anyone know of specific problems I might have doing so? Thanks in advance-Patrick

[sqlalchemy] Re: Python 2.6 hash behavior change

2008-03-03 Thread Patrick Hartling
On Mar 3, 2008, at 11:23 AM, Michael Bayer wrote: On Mar 3, 2008, at 11:56 AM, Patrick Hartling wrote: hash(Works()) hash(Works2()) # Raises TypeError with Python 2.6 because Fails is deemed unhashable. hash(Fails()) Does anyone know of a workaround for this issue? So far

[sqlalchemy] Date only (no time stamp) selects not working with datetime/mx.DateTime objects

2007-09-22 Thread Patrick McKinnon
I used to be able to select from a mysql date column using a datetime object; where the timestamp would be ignored because the DB schema isn't using the datetime column type. query = Table.query().filter(Table.c.date == datetime(2007, 1, 1)) The mysql log shows the select being generated like

[sqlalchemy] polymorphic inheritance with multiple foreign keys

2007-08-21 Thread Patrick Wagstrom
. Please specify the 'onclause' of this join explicitly. Unfortunately, when creating the mapper, I can't specify an onclause to the mapper. Any help on how I would accomplish this and get my such a structure in SQLAlchemy? Thanks! --Patrick --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: Cant locate any foreign key columns in primary join condition (one-to-many tree)

2007-07-09 Thread Patrick McKinnon
, Michael Bayer [EMAIL PROTECTED] wrote: On May 24, 2007, at 10:02 AM, Patrick McKinnon wrote: sqlalchemy.exceptions.ArgumentError: Cant locate any foreign key columns in primary join condition 'attribute.child_id = child.id AND child.parent_id = parent.id' for relationship 'Parent.attributes

[sqlalchemy] Cant locate any foreign key columns in primary join condition (one-to-many tree)

2007-05-24 Thread Patrick McKinnon
( child = relation(Child, backref=backref('attributes')), ) ) metadata.create_all() p = Parent() -- Any ideas? Thanks! -Patrick --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: Inspect and __init__ of a mapped class

2007-02-04 Thread Patrick Lewis
On Feb 4, 5:54 am, [EMAIL PROTECTED] wrote: I'm trying to create a mapped object where I don't know what the exact constructor arguments of the object might be. I was trying to use the inspect module to get the right arguments, but it looks like the mapper is redefining the original

[sqlalchemy] Inspect and __init__ of a mapped class

2007-02-03 Thread Patrick Lewis
Hi, I'm trying to create a mapped object where I don't know what the exact constructor arguments of the object might be. I was trying to use the inspect module to get the right arguments, but it looks like the mapper is redefining the original class __init__. Any thoughts as to how I might

[sqlalchemy] Re: Test data apparently not saving

2007-01-18 Thread Patrick Lewis
After upgrading sqlite to the most recent version (3.3.10), my problem went away and everything works as expected. Thanks for the help, and sorry for the noise. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: Test data apparently not saving

2007-01-13 Thread Patrick Lewis
I reran the above with a postgres database, and it all worked as expected. --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: autoloading oracle tables and the owner parameter

2007-01-12 Thread Patrick Down
Thanks, I will give that a try. --~--~-~--~~~---~--~~ 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] Re: Test data apparently not saving

2007-01-11 Thread Patrick Lewis
Ok, that works for me, too. But, if I rework it how I think the test suite is running things, I get the same error. http://paste.turbogears.org/paste/832 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: Test data apparently not saving

2007-01-11 Thread Patrick Lewis
A minor revision (made user1 global) http://paste.turbogears.org/paste/833 --~--~-~--~~~---~--~~ 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