-
Notifications
You must be signed in to change notification settings - Fork 566
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
Add support for new JSON type #1430
Comments
Thanks for working on this! I was starting to use the new JSON data type today and err := db.PrepareBatch(context.Background(), "INSERT INTO json_test") you will get the error |
SOLVED: only works by appending Leaving the original below for future readers/googlers... It's also problematic that selecting a This doesn't change when using You can see this in @mshustov's code snippet:
|
Found a bug that prevented enabling |
Scope:
Object('json')
ch-go
from @SpencerTorres preliminary research
What works:
string
JSON
when it is first cast to a string (::String
). Must be scanned into a Gostring
type.Dynamic
column (from within aJSON
object) when it is first cast to a string (::String
). Must be scanned into a Gostring
type.What doesn't work:
json.RawMessage
([]byte
) does not work (although I don't believe this works forString
either)JSON
type column, the Go driver reports it as an unsupported typeDynamic
type column, the Go driver reports it as an unsupported typeSample SQL:
Sample code:
Example of selecting an object key in Grafana (which uses our latest Go driver):
The text was updated successfully, but these errors were encountered: