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

Add Python API binding for prepared statement #1305

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

mewim
Copy link
Collaborator

@mewim mewim commented Feb 21, 2023

This PR adds binding for prepared statement to Python API. It exposes the prepare function to Python API and adds PreparedStatement class to Python. The execute is modified accordingly to support both query string and prepared statement as a parameter. If a query string is provided, it will be prepared automatically.

Additionally, this PR adds support for interval data type (timedelta in Python) as a query parameter for Python execute.

Copy link
Contributor

@andyfengHKU andyfengHKU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tools/python_api/src_cpp/py_prepared_statement.cpp Outdated Show resolved Hide resolved
@mewim mewim merged commit 93140d2 into master Feb 21, 2023
@mewim mewim deleted the python-prepared-statement branch February 21, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants