Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite3: don't copy string in bind() #1158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 21, 2023

  1. sqlite3: don't copy string in bind()

    Change bind() to pass sqlite3_bind_text() a pointer to the strings data
    instead of converting it to a []byte just so a pointer to `&b[0]` can be
    passed to unsafe.Pointer. Basically, this saves a needless allocation.
    and passing a pointer to that.
    
    This is safe because sqlite3_bind_text does not keep a copy of the
    provided string.
    charlievieth committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    e4ab09f View commit details
    Browse the repository at this point in the history