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

Support SQL params in query execution #37

Merged
merged 1 commit into from
Apr 7, 2024
Merged

Support SQL params in query execution #37

merged 1 commit into from
Apr 7, 2024

Conversation

xiangfu0
Copy link
Collaborator

@xiangfu0 xiangfu0 commented Apr 7, 2024

Support SQL params in query execution.
Add below method into Connection struct:
func (c *Connection) ExecuteSQLWithParams(table string, queryPattern string, params []interface{}) (*BrokerResponse, error)

Sample usage:

...
queryPattern := "SELECT * FROM table WHERE id = ?"
params := []interface{}{42}
brokerResp, err := conn.ExecuteSQLWithParams("baseballStats", queryPattern, params)
...

@xiangfu0 xiangfu0 merged commit a7cac9a into master Apr 7, 2024
7 checks passed
@xiangfu0 xiangfu0 deleted the sql-params branch April 7, 2024 04:52
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

1 participant