[sqlalchemy] MYSQL ON_DUPLICATE_KEY_UPDATE implementation

2017-05-22 Thread Михаил Доронин
I've rewritten tests to match other tests and have been able to run them successfully. I've also made pull request . I've tested sql generation in `test_compiler` and that values that should be updated have been updated and values that shouldn't ha

[sqlalchemy] many-to-many relationship : how to update items properly if there are duplicates entries ?

2017-05-22 Thread yoch . melka
Hi, I'm trying to create a tag system with a many-to-many relationship approach, and I have problems with the updating phase. class Post(Base): __tablename__ = 'post' id = Column(Integer, primary_key=True) _tags = relationship('Tag', secondary='post_tags') @property def tag

Re: [sqlalchemy] dialect's default_schema_name not used for MetaData object

2017-05-22 Thread mike bayer
On 05/21/2017 11:21 PM, ben4ever wrote: if you refer to a table without a schema name, that's the schema it will actually use Yes, and that's the problem. In my dialect's base.py I define the following method: | def _get_default_schema_name(self, connection): return 'pub' | But