trinodb / trinodb/trino-python-client

Document how to use prepared statements

Open
#125 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

documentation good first issue
Dominant language
Python
Stars
439
Forks
206
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the client documentation section covering query execution or parameters; no specific file is named in the issue. Document Python DB-API prepared statements with cursor.execute(sql, params), question-mark placeholders, and tuple or list parameters, using the provided example as the completion reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.