Android Room + Window Functions

后端 未结 3 1658
情深已故
情深已故 2021-01-19 06:52

I try to use a Window Functions in a Room Query. The parser is complaining about my query. I simply try to add a \"ROW_NUMBER() OVER (ORDER BY column)\" expression in my sel

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-19 07:03

    Android Room will not be using a version of SQLite that includes the Windows Functions which requires SQLite 3.25.0 or greater, as per :-

    Window function support was added to SQLite with release version 3.25.0 (2018-09-15). The SQLite developers used the PostgreSQL window function documentation as their primary reference for how window functions ought to behave. Many test cases have been run against PostgreSQL to ensure that window functions operate the same way in both SQLite and PostgreSQL. Window Functions

    The latest Android API 28 appears to use 3.19 as it is not listed at android.database.sqlite, so it would use the same as API 27.

    As such the SQLite sees the unknown clause as a syntax error.

提交回复
热议问题