2015-09-22 11:52 GMT-07:00 Sergi Pons Freixes :
> 2015-09-22 10:41 GMT-07:00 Mike Bayer :
>
>>
>> So one more time, with all detail possible; attached is an env.py script
>> and a full log of all SQL emitted and commands; we have alembic_version is
Just do it in Python:
res = []
for hpoint in session.query(HistoryPoint).all():
res.setdefault(hpoint.vehicle_id, []).append({'id':hpoint.id,'location':
str(hpoint.location)})
On Tuesday, September 22, 2015 at 6:48:14 PM UTC+3, Johnny W. Santos wrote:
>
> Supose I have the models below, how
This is, admittedly, an abuse of SqlAlchemy. I'm wondering if anyone else
has dealt with this situation before and how they handled it.
We have a handful of situations where SqlAlchemy generates a raw sql update
against a table. Something like
_table = model.Foo.__table__
What haven't you thought of, Michael Bayer? Is there anything SqlAlchemy
can't do?!?!?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
2015-09-22 10:44 GMT-07:00 Mike Bayer :
>
>
> On 9/22/15 1:41 PM, Sergi Pons Freixes wrote:
>
> Additional update: If on the env.py I substitute "__table_args__ =
> {'schema': 'notifications'}" for "__table_args__ = {'schema':
> 'notifications'}" and rerun alembic twice
2015-09-22 10:41 GMT-07:00 Mike Bayer :
>
> So one more time, with all detail possible; attached is an env.py script
> and a full log of all SQL emitted and commands; we have alembic_version is
> created in "public", the two tables created only in "notifications", no
>
On 9/22/15 2:25 PM, Sergi Pons Freixes wrote:
2015-09-22 10:44 GMT-07:00 Mike Bayer >:
On 9/22/15 1:41 PM, Sergi Pons Freixes wrote:
Additional update: If on the env.py I substitute "__table_args__
= {'schema':
On 9/22/15 1:41 PM, Sergi Pons Freixes wrote:
Additional update: If on the env.py I substitute "__table_args__ =
{'schema': 'notifications'}" for "__table_args__ = {'schema':
'notifications'}" and rerun alembic twice again (assuming we start on
a clean database), alembic_version is created
Correction:
res = {}
for hpoint in session.query(HistoryPoint).all():
res.setdefault(hpoint.vehicle_id, []).append({'id':hpoint.id,'location':
str(hpoint.location)})
But it will yield a dict, not an array of single-value dicts as requested
(are you sure this is what you want? anyways, it's
On 9/22/15 1:52 PM, Jonathan Vanasco wrote:
This is, admittedly, an abuse of SqlAlchemy. I'm wondering if anyone
else has dealt with this situation before and how they handled it.
We have a handful of situations where SqlAlchemy generates a raw sql
update against a table. Something like
Anyway thanks, it'll help a lot.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to
Yes, but I think this will be expensive to arrange it with python because I
need to return everything at once.
I though I could just group_by with some annotation, but I couldn't figure
out how.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To
Additional update: If on the env.py I substitute "__table_args__ =
{'schema': 'notifications'}" for "__table_args__ = {'schema':
'notifications'}" and rerun alembic twice again (assuming we start on a
clean database), alembic_version is created on the 'notifications' schema,
t1 and t2 on
On 9/22/15 3:43 PM, Sergi Pons Freixes wrote:
2015-09-22 11:52 GMT-07:00 Sergi Pons Freixes >:
2015-09-22 10:41 GMT-07:00 Mike Bayer >:
So one more time, with
2015-09-22 16:24 GMT-07:00 Mike Bayer :
> Revision runs fine, but now when I run the upgrade it does not find the
> alembic_version table (attached logs)... I suspect that the search_path is
> restored so that it takes notifications again by default?
>
>
> yes
>
>
>
On 9/22/15 6:49 PM, Sergi Pons Freixes wrote:
2015-09-22 15:06 GMT-07:00 Mike Bayer >:
OK, the only possible way this would happen is if "SELECT
current_schema()" were returning the name "notifications", and I
went back
On 9/22/15 7:18 AM, Yegor Roganov wrote:
I know that I can encapsulate multiple columns into one using either
composite column or hybrid_property, but unfortunatelly neither suits
me 100%.
Let's say I have a `File` model which includes fields `id`,
'file_name`, `storage_type`,
and there is
I know that I can encapsulate multiple columns into one using either
composite column or hybrid_property, but unfortunatelly neither suits me
100%.
Let's say I have a `File` model which includes fields `id`, 'file_name`,
`storage_type`,
and there is a `get_url` python function that when given
Supose I have the models below, how could I query for a result like this:
[
{1: [{"id": 3, "location": "POINT(23.23423423 54.234524234)"},{"id": 4,
"location": "POINT(23.23423423 54.234524234)"}]},
{2: [{"id": 45, "location": "POINT(78.23423423 43.234524234)"},{"id": 67,
"location":
19 matches
Mail list logo