Skip to content

sqlite: db.prepare(sql).set* chain #61235

@mike-git374

Description

@mike-git374

Problem

Currently you need multiple lines and multiple js statements to declare a single SQLite statement. If the statement.set* functions return the statement you could chain 1 or more set* functions to declare the sql statement with 1 line of code which is more readable and easier to work with:

Proposal

// before
const q = db.prepare(sql);
q.setReturnArrays(true); // returns void, requires 2 js statements

// after
const q = db.prepare(sql).setReturnArrays(true); // returns sql statement

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions