File size: 362 Bytes
d6f631f
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
}