statement.setReadBigInts(enabled)


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

从数据库读取时,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.】