Alexander
Sure
Alexander
As a short explanation:
It is possible to embed arbitrary Python expression inside a PonyORM query if that expression does not use loop variables. For example
x = 10
y = 'hello'
select(p for p in Person if p.name > foo(bar(x), baz(y)))
In that query foo(bar(x), baz(y)) is external expression which can be evaluated outside of the query. For such expression Pony does eval and get its result. Pony does not analyze what is inside such an expression. The only thing that mater for Pony is the type of the resulted value of a whole external expression.
PonyORM threats ModelType.PREPARER.value as external expression. At this moment PonyORM does not know anything about Enum type, but the resulted type of a whole external expression is int and Pony can process it without any problem.
Lucky
Alexey
No worries, the reply that follows was in English
Anonymous
Hi Alexey, i have seen http://stackoverflow.com/questions/16115713/how-pony-orm-does-its-tricks question in stack overflow. There are 3 steps in translation and step 1 is described in detail. Can you explain about step2 ? Also is there any good reference on abstract SQL ?
Alexey
Alexey
as per the Abstract SQL - it is not documented yet, because it is not a part of the public API. But at some point I think we should provide the documentation for it.
Anonymous
Thanks a lot Alexey
Romet
Hi! I see the asyncio/futures issue keeps getting bumped on github. Are there any actual plans for this?
Mikki
Welcome!
Angel
Thanks
Rozen
migrations migrations! :D
Romet
Makes sense, godspeed :)
Lucky
Romet
I'm personally a huge fan of Django's ORM. If the migration system ends up being anything like it, it would be pretty great :)
Alexey
Lucky
Lucky
Alexey
Lucky
How I would use it, in general
Lucky
I will see
Angel
What data pattern does the pony use?
Alexey
Angel
Thanks for the answer. I guess Im not very familiar with the nomenclature but, I was referring to as active record or data mapper?
Alexey
Data Mapper
Angel
Thanks
Lucky
I still think, this logo feels like Pöny
Mikhail
всем привет, на русском общение приветствуется?
Lucky
I cant read that
Mikhail
Do anybody use pony with tornado?
Mikhail
How about threading-safe?
Anonymous
Anonymous
ДОЛБОЕБ
Anonymous
УВИЖУ ЕЩЕ ОДНО РУССКОЕ СЛОВО
Anonymous
И ПОЛУЧИШЬ ЛЮЛЕЙ
Anonymous
Goodbye guys, have a good day
Lucky
This feels like capslock xD
Lucky
Romet
I'm not fluent in russian
Romet
But he was being a bit rude
Lucky
I think he joined, said (in Russian) that Russian is bad and left again.
Lucky
Leonid
«SO,
MOTHERF**KER
IF I'LL SEE ANY RUSSIAN WORD IN HERE AGAIN
I'LL BEAT YOU IN THE FACE»
Leonid
If this is ok — welp, this means where is something wrong.
Lucky
I couldn't read it before. Welp thank you.
Mikhail
may be reason is he was ukrainian? :)
Mikhail
so, does anybody used pony orm in async apps?
Lucky
Nope, me did not.
Romet
I wanted to, but apparently no asyncio support
Mikhail
Guys, may I use Pony's json type for describing array field in postgres?
Angel
sorry
Alexey
Angel
please disregard
Mikhail
as is and without creating own array class?
Mikhail
diagram editor doesn't support json type
Lucky
Alexey
Alexey
Mikki
Welcome!
Lucky
Not a pony orm related question, but more general:
I have made some Mixin classes.
Now I want to make a package where I have some ready-to-use classes.
I have no good ideas on how to call that file
Lucky
Lucky
So you don't have to do it yourself
Lucky
Current filename is mixed_mixins.py
Lucky
And I'm not happy about it :D
Romet
i'm a django user so i'd go with how everything else is named
Romet
so there's models, tests, etc.. and i would just use "mixins"
Lucky
How would that be?
Lucky
The mixins are already in a file called like that.
Lucky
Vitalii
Hi! It is a quite good practice not to separate mixins from the rest of your classes and name / group them by their logical purpose.
Lucky
Thanks for your answers!
Mikki
Welcome!
Mark ☢️
Romet
i'd like to take a moment and thank you for introducing me to this stallman sticker pack
Mark ☢️
Angel
Romet