Skip to content

Document how to use prepared statements #125

Open
@hashhar

Description

@hashhar

The client is based on Python DB-API so the usage is cursor.execute(sql, params).
We use ? for params.

So an example would look like:

cursor.execute("SELECT * FROM tbl WHERE col_1 = ? AND col_2 = ?", ("value_1", "value_2",))

Note that params can either be a tuple or list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions