镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add a method for retrieving the database location #57859

Description

@geeksilva97

What is the problem this feature will solve?

This might be useful for cases where only the DatabaseSync object is received.

What is the feature you are proposing to solve the problem?

Add the method DatabaseSync.prototype.location as a wrapper to sqlite3_db_filename. It might receive the database name as an argument.

What alternatives have you considered?

N/A

Activity

  1. added
    feature requestIssues requesting new Node.js features.
    sqliteIssues and PRs related to the SQLite subsystem.
    on Apr 13, 2025
  2. self-assigned this
    on Apr 13, 2025
  3. moved this from Awaiting Triage to Triaged in Node.js feature requestson Apr 13, 2025
  4. moved this from Triaged to In Progress in Node.js feature requestson Apr 13, 2025
  5. tniessen commented on Apr 13, 2025

    @tniessen
    Member

    While simple enough, I am wondering if this is a pattern that we want to promote? I assume the intention is that applications can re-open the same database again? If so, then relying on this path alone may discard connection parameters since Node.js is setting SQLITE_OPEN_URI as far as I remember, and some VFS implementations may even allow moving database files around while they are open. If that is not the primary use case, I'd be curios what is.

  6. geeksilva97 commented on Apr 13, 2025

    @geeksilva97
    ContributorAuthor

    I assume the intention is that applications can re-open the same database again?

    That's correct.

    Honestly, this is the case I used so far. These use cases you brought are interesting, and SQLite docs mention ways to handle them https://sqlite.org/c3ref/uri_boolean.html.

    Maybe we can start with this very basic implementation and add more capabilities later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature requestIssues requesting new Node.js features.sqliteIssues and PRs related to the SQLite subsystem.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions