How to use the better-sqlite3.Integer function in better-sqlite3

To help you get started, we’ve selected a few better-sqlite3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eez-open / studio / packages / eez-studio-shared / db.ts View on Github external
query,
                args
            });

            if (err) {
                throw err;
            } else {
                for (const row of rows) {
                    for (const key in row) {
                        if (row.hasOwnProperty(key)) {
                            const value = row[key];
                            if (value && typeof value === "object") {
                                const low = row[key].low;
                                const high = row[key].high;
                                if (low !== undefined && high !== undefined) {
                                    row[key] = Database.Integer.fromBits(low, high);
                                }
                            }
                        }
                    }
                }

                return rows;
            }
        }
    };

better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.

MIT
Latest version published 14 days ago

Package Health Score

85 / 100
Full package analysis

Popular better-sqlite3 functions