[sqlalchemy] Re: Transactions

2018-01-08 Thread Tolstov Sergey
Problem fixed with delete *threaded* parameter on Flask, sorry -- 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

[sqlalchemy] Re: Transactions

2018-01-08 Thread Tolstov Sergey
вторник, 9 января 2018 г., 9:08:22 UTC+3 пользователь Tolstov Sergey написал: > > I use transactions and sometimes it must be *session.rollback*. > Sometimes i get a AttributeError: 'NoneType' object has no attribute > 'twophase' > That error raises, when one transaction open and processed,

[sqlalchemy] Transactions

2018-01-08 Thread Tolstov Sergey
I use transactions and sometimes it must be *session.rollback*. Sometimes i get a AttributeError: 'NoneType' object has no attribute 'twophase' That error raises, when one transaction open and processed, and *another* transaction with session use *rollback* -- SQLAlchemy - The Python SQL

Re: [sqlalchemy] sqlalchemy.func.lower in a primaryjoin

2018-01-08 Thread Mike Bayer
func should be there but also you can use a lambda instead, or a def that can even have imports in it. On Jan 8, 2018 5:14 PM, "Jonathan Vanasco" wrote: > I'm using declarative. > > I need to map a viewonly relationship that uses sqlalchemy.func.lower in > the

[sqlalchemy] sqlalchemy.func.lower in a primaryjoin

2018-01-08 Thread Jonathan Vanasco
I'm using declarative. I need to map a viewonly relationship that uses sqlalchemy.func.lower in the primaryjoin. `func` doesn't seem available in `ext/declarative/clsregistry.py` and can't be used in the string context. is that correct? i have a workaround of declaring the class, then

Re: [sqlalchemy] dialect issue with pyodbc.Row type

2018-01-08 Thread Mike Bayer
On Sun, Jan 7, 2018 at 9:07 PM, Russ Wilson wrote: > I noticed if you use the cursor.fetchmany it returns the pyodbc types. Is > this an issue with the dialect? if you use the connection execute you are > correct it returns a resultrow. Thanks for the help. > > cursor =

Re: [sqlalchemy] Regression for sub-second precision when inserting timestamps into Oracle database

2018-01-08 Thread Mike Bayer
On Mon, Jan 8, 2018 at 12:55 PM, Stefan Schwarzer wrote: > Hello, > > I've run into a problem that's present in SQLAlchemy 1.2, but not 1.1.15 > when run against an Oracle 11.2 database using cx_Oracle 6.1. OK, I had no idea oracle had any fractional seconds support

[sqlalchemy] Regression for sub-second precision when inserting timestamps into Oracle database

2018-01-08 Thread Stefan Schwarzer
Hello, I've run into a problem that's present in SQLAlchemy 1.2, but not 1.1.15 when run against an Oracle 11.2 database using cx_Oracle 6.1. When creating the table `TIMESTAMP_TEST` with CREATE TABLE TIMESTAMP_TEST ( TS TIMESTAMP(6) ) and running the following code import datetime import

feedback request on support for sequences with --autogenerate

2018-01-08 Thread Brian DeRocher
[23:13] I just started using Alembic/SA in a project that had a well established database. [23:13] I'm so glad there's support for relationships.  Thanks! [23:13] But there was no support for sequences, when it came to --autogen. [23:14] So I took a stab at adding that and I got the happy