react native – How do define REGEX or REGEXP function in `expo-sqlite`

I am building an Expo app, using expo-sqlite and TypeOrm through DataSource to interact with the mobile device built-in sqlite DB.

I need to be able to use a regex matching function while querying from the database.

Here how i built my TypeOrm DataSource.

new DataSource({
  database: 'db-name',
  type: 'expo',
  driver: SQLite,
  entities: [...entities],
  synchronize: true,
  logging: 'all',
})

Whenever I use REGEXP function as follows

query.where(`user.name REGEXP 'stringQuery'`)

I always get the same error.

Error code 1: no such function: REGEXP

How can I define the REGEXP function or any other regex matching functionality ?

Read more here: Source link