tekartik / sqflite

SQLite flutter plugin
BSD 2-Clause "Simplified" License
2.88k stars 526 forks source link

RegExp #922

Open gaddlord opened 1 year ago

gaddlord commented 1 year ago

I get the following error:

no such function: regexp, SQL logic error (code 1)

while executing:

select * from Cards where Cards.Rules regexp '(.*?)Add\s\{.*?\}(.*)')

Maybe sqflite was compiled without RegEx support?

bksubhuti commented 1 year ago

i'm here for the same reason. Db browser works with this but fails in code:

 SELECT dpd.word as word from dictionary_books, dpd
      WHERE dpd.word LIKE 'pur%' AND dictionary_books.id = 11
      AND dictionary_books.user_choice = 1
      AND dpd.word NOT REGEXP '[0-9]+'
      LIMIT 80
TomasJohansson commented 1 year ago

Same problem here. It would be nice with support for the regexp function when using sqflite.

gaddlord commented 1 year ago

Likely the reason is since sqlite.dll was not built with support for REGEXP. One can check https://stackoverflow.com/questions/6288287/sqlite-in-c-and-supporting-regexp