Expo SQLite WITH clause (CTE) doesn't seem to be working for android?

38 views Asked by At

I am using TypeORM to run a raw query that contains a WITH clause, and it works on iOS, but on Android it seems to be giving issues: QueryFailedError: unknown error (code 0 SQLITE_OK): Queries can be performed using SQLiteDatabase query or rawQuery methods only.

This is my query that I am running. It works fine on iOS, not Android.

WITH epochranges AS (
   SELECT 1696143600 AS start_range, 1696230000 AS end_range UNION ALL 
   SELECT 1696230000 AS start_range, 1696316400 AS end_range
) SELECT * from epochranges

Running this alone seems to work fine.

SELECT 1696143600 AS start_range, 1696230000 AS end_range UNION ALL SELECT 1696230000 AS start_range, 1696316400 AS end_range
0

There are 0 answers