statement.setReadBigInts(enabled)


  • enabled <boolean> 从数据库读取 INTEGER 字段时启用或禁用 BigInt 的使用。

    ¥enabled <boolean> Enables or disables the use of BigInts when reading INTEGER fields from the database.

从数据库读取时,SQLite INTEGER 默认映射到 JavaScript 数字。但是,SQLite INTEGER 可以存储比 JavaScript 数字能够表示的更大的值。在这种情况下,此方法可用于使用 JavaScript BigInt 读取 INTEGER 数据。此方法对始终支持数字和 BigInt 的数据库写入操作没有影响。

¥When reading from the database, SQLite INTEGERs are mapped to JavaScript numbers by default. However, SQLite INTEGERs can store values larger than JavaScript numbers are capable of representing. In such cases, this method can be used to read INTEGER data using JavaScript BigInts. This method has no impact on database write operations where numbers and BigInts are both supported at all times.