Total-Trainwrec
idk if anyone knows any art groups on telegram
Alexander
This is another type of Pony ;)
Total-Trainwrec
Romet
pls no
Rozen
wtf
ସ୍ୱାଧୀନ 🇮🇳 🐕🎧🗺
😂😂😂
Anonymous
Hey, quick querying question. I'm new to pony, and I'm trying to go through the query builder rather than drop to sql. I want "SELECT fieldname, COUNT(*) FROM Table GROUP BY fieldname" but can't seem to figure it out.
Alexander
select((x.fieldname, count()) for x in MyEntity)
Anonymous
fantastic. thank you very much
Alan
this may be a silly question - but is there a way I can have pony add a column to my DB? Or does I need to do that separately and then declare it?
Alexander
It may be done with migration tool. It should be released soon
Lucky
I'm sorry
Lucky
(Actually, I lied, I'm not sorry)
Святослав
Offtop: when i saw all this pictures i think "My Little Pony ORM", it's so cute
Romet
Can we not bring MLP into this please
Anonymous
What is MLP?
Anonymous
I tried to make pony orm combine with Wxpython...hope it will work flawless
Anonymous
I have to separate each event in wxpython onto @db_session...
Anonymous
Wish mr luck
Anonymous
-*me
Lucky
MLP Season 8 airing in about an hour! https://cytu.be/r/TheBronyNetwork
Anonymous
Any idea how to setup my relation ships of the entities? https://pastebin.com/AiPG8S9h
Anonymous
Of course I've read the doc but I don' get this running.
Alexey
You need to specify the other side of the relationship in the Server entity
Juacy
hello guys... can i use pony to store password hashes?
Juacy
i use pony+bcrypt
Anonymous
@alexeymalashkevich https://pastebin.com/raw/LuZdc5bD I've included the user_id but somehow it uses always "User" as name, so I get: pony.orm.core.ERDiagramError: Reverse attribute for CounterStrike_Server_Go.user not found
Alexey
Sorry, in the User entity
Juacy
i use uuid for id, but i can use for password too?
Anonymous
Isn't there a way to get rid of this? I only need the relation from server to user.
Alexey
i use uuid for id, but i can use for password too?
UUID is universally unique identifier You can use this type for storing password hashes too if the hash has the same format at UUID Or you can use str type
Alexey
Isn't there a way to get rid of this? I only need the relation from server to user.
Currently Pony requires two attributes for establishing a relationship
Anonymous
I don't get it. How to setup this simple relationship. 1:n between users->servers and 1:1 between server and user. current code: https://pastebin.com/raw/jAxA16b6
Juacy
Currently Pony requires two attributes for establishing a relationship
yes, you need to declare in two sides of relationship!
Alexey
@jaheller could you describe your scenario, why you want to declare just one side?
Anonymous
Of course it needs them, I thought pony would "assume" some kind of naming like "use_id" like many frameworks did regarding enities
Anonymous
@alexeymalashkevich I just need to get the user to each server when I select a server.
Juacy
UUID is universally unique identifier You can use this type for storing password hashes too if the hash has the same format at UUID Or you can use str type
I am trying to use bcrypt with pony but it is giving coding error at the time of storing the hash of the password generated with bcrypt, and the error continues in the checking check.
Juacy
i am a begginer in programming
Juacy
ok i go to try
Juacy
sorry for my english
Alexey
@alexeymalashkevich I just need to get the user to each server when I select a server.
Here you can find examples of all relationship types https://docs.ponyorm.com/relationships.html
stsouko
Passwords not unique
Juacy
I was able to store the hash with sha512, bcrypt was giving me a lot of trouble ...
Anonymous
There is no other offline tool for pony, I feel so sad, cause I live in a place which is internet being scarce
Anonymous
right now I try to write by hand...
Anonymous
agree
Anonymous
there would be a market for that area , I believe so
Alexey
Currently we are not working on an offline editor But the new version of the online tool is 99% ready @luckydonald, we count on you as a beta tester ;)
Alexey
Anonymous
I know.. I just hope maybe some dev want to make it offline..
Anonymous
I don't get the relationship running, can someone please take a look into: https://pastebin.com/raw/kTEEX4SG
Rozen
Hi, i have a question :D
Rozen
i would make any sense if i sort of edit dynamically the database structure
Rozen
to call db.generate_mapping twice?
Anonymous
to call db.generate_mapping twice?
Why do you do that for?
Rozen
mmmm let's say that i'm creating a module that want to expand the current database that pony is using and i want that module to be used in more than one project that uses pony 😆
Rozen
without having to edit those projects
Anonymous
I think you can
Alexander
I don't get the relationship running, can someone please take a look into: https://pastebin.com/raw/kTEEX4SG
class User(db.Entity): id = PrimaryKey(int, auto=True) name = Required(str) servers = Set('Server') class Server(db.Entity): _table_ = 'counterstrike_server_go' id = PrimaryKey(int, auto=True) daemon_id = Required(int) user_id = Required(int) user = Required(User, column="user_id")
Alexander
> i would make any sense if i sort of edit dynamically the database structure > to call db.generate_mapping twice? It is not possible (at least for now) to call generate_mapping twice, but you can generate entities inside a function and call that function several times with a different db objects def define_entities(db): class Person(db.Entity): name = Required(str) db1 = Database() define_entities(db1) db2 = Database() define_entities(db2)
Rozen
Thanks :D
Anonymous
hey all
Anonymous
quick question here: if I change the entity structure in my app and restart it, can I get Pony to update the current tables, or do I have to drop the tables and start over?
Anonymous
alright no prob
Anonymous
I'm still in dev phase so it's not too much of an issue
Alexey
ok