openmeter / streaming /clickhouse /utils_query.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 6)
d6f631f verified
Raw
History Blame Contribute Delete
362 Bytes
package clickhouse
import "github.com/huandu/go-sqlbuilder"
type validateJsonPathQuery struct {
jsonPath string
}
// See: https://github.com/huandu/go-sqlbuilder#freestyle-builder
func (d validateJsonPathQuery) toSQL() (string, []interface{}) {
return sqlbuilder.Buildf("SELECT JSON_VALUE('{}', %v)", d.jsonPath).
BuildWithFlavor(sqlbuilder.ClickHouse)
}