Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Unicode-aware SQLite LIKE filtering #2903

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dymanoid
Copy link
Contributor

Fixes: #2755, #2347

This PR changes the behavior of the LIKE SQLite queries. Instead of using the built-in implementation that can run in case-insensitive mode only for ASCII characters (and thus performs case-sensitive comparison for all other, like Cyrillic, diacritic, accents etc), the new implementation is based on JS regex that handles all characters in Unicode.

@github-actions github-actions bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Jun 19, 2024
Copy link

netlify bot commented Jun 19, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 51848b3
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6672b2514b8ccf0008dd28d8
😎 Deploy Preview https://deploy-preview-2903.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Jun 19, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.75 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.25 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 75.73 kB 0%
static/js/wide.js 263.59 kB 0%
static/js/ReportRouter.js 1.23 MB 0%
static/js/index.js 3.02 MB 0%

Copy link
Contributor

github-actions bot commented Jun 19, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.13 MB → 1.13 MB (+273 B) +0.02%
Changeset
File Δ Size
packages/loot-core/src/platform/server/sqlite/unicodeLike.ts 🆕 +824 B 0 B → 824 B
packages/loot-core/src/platform/server/sqlite/index.web.ts 📈 +105 B (+2.01%) 5.1 kB → 5.2 kB
packages/loot-core/src/server/aql/compiler.ts 📈 +20 B (+0.06%) 34.91 kB → 34.93 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.13 MB → 1.13 MB (+273 B) +0.02%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

@github-actions github-actions bot changed the title fix: use Unicode-aware SQLite LIKE filtering [WIP] fix: use Unicode-aware SQLite LIKE filtering Jun 19, 2024
@github-actions github-actions bot added 🚧 WIP Still work-in-progress, please don't review and don't merge and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Jun 19, 2024
@dymanoid dymanoid changed the title [WIP] fix: use Unicode-aware SQLite LIKE filtering fix: use Unicode-aware SQLite LIKE filtering Jun 19, 2024
@github-actions github-actions bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed 🚧 WIP Still work-in-progress, please don't review and don't merge labels Jun 19, 2024
@MatissJanis
Copy link
Member

cc @No898 @mioiox could either of you confirm is this PR patches your issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 Ready for Review Pull Request is not reviewed yet
Projects
None yet
2 participants