Handling deferred attributes automatically
まだ誰も着手していません。
評価
調査の方向性
まず service.orders.get_entities()、Customers のようなナビゲーションプロパティ、および既存の expand("Customers") の動作を追跡します。エンティティ API を維持しながら、OData の __deferred 属性によってオンデマンド読み込みをトリガーする方法を確認します。o.Customers にアクセスすると、expand を明示的に呼び出さなくても遅延データが透過的に提供されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Right now if an entity has a navigation property, the object must be completely reloaded (as below) to load in deferred data in navigation properties. For example:
orders = service.orders.get_entities()
for o in orders:
do_some_stuff_with(o.Customers) # This is an empty list right now so nothing will get done.
# The data must be reloaded as per the below for anything to happen.
orders = service.orders.get_entities().expand("Customers")
I propose that we use the OData __deferred attribute to fire a request on demand to load these attributes in. This would allow the API to look like this:
orders = service.orders.get_entities()
for o in orders:
do_some_stuff_with(o.Customers) # Request is automatically made using the `__deferred` attribute which transparently offers the missing data back to the class.
WDYT: @filak-sap
- 主要言語
- Python
- スター
- 269
- フォーク
- 100
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SAP/python-pyodata のほかの issue
-
fromisotime cleanup when 3.11 is Python miniumum対応中かも @phanak-sap が 9 日前に担当しました。 オープンchore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SAP/python-pyodata#304 · 担当者 1 名 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SAP/python-pyodata#108 ·
-
chore: refactorings for Python 3.10 as minimum version再び着手できるかも @phanak-sap が 105 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンchore
SAP/python-pyodata#302 · 担当者 1 名 ·
-
Unable to get the link rel='delta' when using getEntities() with Delta Service再び着手できるかも @phanak-sap が 344 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンquestion
SAP/python-pyodata#294 · コメント 1 件 · 担当者 1 名 ·
-
Incorrect escaping of path再び着手できるかも @phanak-sap が 743 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
SAP/python-pyodata#282 · コメント 2 件 · 担当者 1 名 ·
SAP/python-pyodata の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mikf/gallery-dl#9791 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
fossasia/eventyay#6151 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
P4: low tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
jeffknupp/association#318 ·
-
azure-cost bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/GitHub-Copilot-for-Azure#3330 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
raullenchai/Rapid-MLX#4097 ·
メンテナーはふだん 1 日以内に返信