Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Utilities to improve observing products #2995

Merged
merged 6 commits into from
Apr 26, 2024
Merged

Utilities to improve observing products #2995

merged 6 commits into from
Apr 26, 2024

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Apr 25, 2024

This PR introduces three changes:

  1. Ability to observe products count.
  2. Ability to limit number of returned products when observing changes. This should help reducing the changes of getting SQLiteBlobTooBigExceptions peaMlT-8i-p2
  3. Ability to exclude sample products in the SQL query instead of doing a runtime filtrage, this was needed to support the point 2, and it should also bring some improvements.

Check woocommerce/woocommerce-android#11380 for testing.

@hichamboushaba hichamboushaba force-pushed the observe-products-count branch from afff8ef to 4d5ed81 Compare April 25, 2024 13:50
@hichamboushaba hichamboushaba force-pushed the observe-products-count branch from 620dd1f to f0b74ff Compare April 25, 2024 14:28
@hichamboushaba hichamboushaba force-pushed the observe-products-count branch from f0b74ff to 85bd6da Compare April 25, 2024 14:32
@hichamboushaba hichamboushaba changed the title Observe products count Utilities to improve observing products Apr 25, 2024
Copy link
Contributor

@0nko 0nko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -173,6 +173,13 @@ data class ProductApiResponse(
bundledItems = response.bundled_items?.toString() ?: ""
compositeComponents = response.composite_components?.toString() ?: ""
metadata = response.metadata?.toString() ?: ""
isSampleProduct = response.metadata?.any {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! 👏

@0nko 0nko merged commit 4d21f7e into trunk Apr 26, 2024
14 checks passed
@0nko 0nko deleted the observe-products-count branch April 26, 2024 12:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants