startreedata / pinot-client-go

Apache Pinot Golang Client managed by StarTree
Apache License 2.0
28 stars 10 forks source link

Support SQL params in query execution #37

Closed xiangfu0 closed 7 months ago

xiangfu0 commented 7 months ago

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)
...