Skip to content

libsqlite3-sys: support 3.20 (or sqlite3_prepare_v3()) in pre-generated bindings #1731

Description

@abonander

In SQLx, we're forced to use either the bundled or the bindgen features because we unconditionally depend on sqlite3_prepare_v3() which was not added until SQLite 3.20.0: https://www.sqlite.org/changes.html#version_3_20_0

We use the SQLITE_PREPARE_PERSISTENT flag as designed to avoid the depletion of lookaside memory because we cache prepared statements for potentially very long periods of time: https://www.sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparepersistent

However, the bundled and bindgen features both have significant tradeoffs, so some users would probably like to have the option of using pre-generated bindings.

Would it be possible to add a min_sqlite_version_3_20_0 feature that includes all APIs supported by 3.20? I'd be happy to open a PR if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions