Query takes the Session as an argument so you should be able to say:
q = MyQuery([MyModel], session=my_session)
On 07/11/2016 03:23 PM, Антонио Антуан wrote:
Can I specify query_cls only for a one query? I try to change
query.session._query_cls and, of course, it doesn't work...
I want to
Can I specify query_cls only for a one query? I try to change
query.session._query_cls and, of course, it doesn't work...
I want to perform something like this:
query = Session.query(MyModel)...
default_querycls_result = query.all()
custom_querycls_result =
It seems that I am wrong since I do see all column names in uppercase using
sql developer (all but reserved words) so I don't know how this happened
since my models are all lowercase (could it be Base.metadata.create_all?)
but that is indeed the problem.
Using 'SCOPE' in the alter method does
For sure the table was not created using capital letters or quotes but I'll
try your suggestion, thanks.
On Jul 11, 2016 6:02 PM, "Mike Bayer" wrote:
>
>
> On 07/11/2016 10:48 AM, Ofir Herzas wrote:
>
>> Alembic 0.8.6
>> cx-Oracle 5.1.3
>> SQLAlchemy 1.0.14
>>
>>
>> I
Alembic 0.8.6
cx-Oracle 5.1.3
SQLAlchemy 1.0.14
I have a column named "scope" (without the double quotes) with an existing
type of SmallInt and I'm trying to change it to an Integer with the
following line:
op.alter_column('t_rule', 'scope', existing_type=sa.SmallInteger(), type_=sa
sure I can accept a PR for that...
On 07/10/2016 03:47 PM, Martijn van Oosterhout wrote:
Hoi,
See $SUBJECT.
This is a bit of a corner case, but sometimes I want to change the
class_ generated by a sessionmaker(). There is a
sessionmaker.configure() but it can configure everything except the