opral / lix-sdk

1 stars 0 forks source link

use sqlite glob function instead of `minimatch` #85

Open samuelstroschein opened 1 month ago

samuelstroschein commented 1 month ago

Context

File handlers in lix use minimatch to match the plugin.glob prop with files. That's problematic because minimatch globbing likely differs from sqlite's glob implementation which will lead to unexpected behavior.

Proposal

Use SQLite's globbing function.

SQLite's glob function should be usable via a query like this

SELECT 'value_to_test' GLOB 'pattern';

The select query will return 1 if it matches or 0 if not.