Open vidmed opened 7 years ago
I see two ways to solve this issue:
clickhouse.NewRawQuery()
which will create Query that won't be prepared before runningargs
slice is emptyIn my opinion 1 is preferable, but it also adds entropy. Do you have any ideas?
Я думаю, можно добавить дополнительный флаг в Query, который бы сигнализировал о том, что подготовка не нужна. Например так
type Query struct {
Stmt string
args []interface{}
externals []External
prepare bool
}
И да, добавить еще один метод для получения такого запроса
func NewRawQuery(stmt string) Query {
return Query{
Stmt: stmt,
prepare: false,
}
}
I want to use insert statement with format csv. For example
For this purpose my code looks like (simplified)
Everething works ok untill there is no "?" character in my query statement. When I`m doing something like this
I have panic
This panic cause your prepareHttp function in transport.go file, which tries to replace every "?" character with some arg, but
args
slice is empty.Please, can you fix the problem or tell me how I can do such queries in another way.