Skip to main content
StatementSync.prototype.setReadBigInts - sqlite - Node documentation
method StatementSync.prototype.setReadBigInts

Usage in Deno

import { StatementSync } from "node:sqlite";
StatementSync.prototype.setReadBigInts(enabled: boolean): void

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.

Parameters

enabled: boolean

Enables or disables the use of BigInts when reading INTEGER fields from the database.

Return Type

void