Retourner au contenu associé (lien : Pony is a Python ORM with beautiful query syntax)
Posté par Gil Cot ✔ (site web personnel, Mastodon) le 28 septembre 2023 à 12:32. En réponse au lien Pony is a Python ORM with beautiful query syntax. Évalué à 2.
Sur la page d'accueil, presqu'au milieu à droite, on lit :
Here is Pony query example: select(c for c in Customer if sum(c.orders.price) > 1000) which is being translated into the following SQL:
select(c for c in Customer if sum(c.orders.price) > 1000)
En gros, de ma compréhension, on a ceci avec PonyORM
ResultSet = select(nom for nom in users)
Cela ressemblerait, grosso-modo, sous SQLAlchemy à :
query = db.select([users.columns.nom]) ResultProxy = connection.execute(query) ResultSet = ResultProxy.fetchall()
Et dans l'exemple sur la page ce serait quelque chose comme ? (j'ai un petit doute)
db.select([Customer.columns.c]).where(Customer.columns.price > 1000)
https://docs.ponyorm.org/queries.html
"It is seldom that liberty of any kind is lost all at once." ― David Hume
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: SQLAlchemy
Posté par Gil Cot ✔ (site web personnel, Mastodon) . En réponse au lien Pony is a Python ORM with beautiful query syntax. Évalué à 2.
Sur la page d'accueil, presqu'au milieu à droite, on lit :
En gros, de ma compréhension, on a ceci avec PonyORM
Cela ressemblerait, grosso-modo, sous SQLAlchemy à :
Et dans l'exemple sur la page ce serait quelque chose comme ? (j'ai un petit doute)
https://docs.ponyorm.org/queries.html
"It is seldom that liberty of any kind is lost all at once." ― David Hume