Adds an implicit cast from the source type float64 to any expected numeric destination (column) type. These changes, and the previous work in https://github.com/marcboeker/go-duckdb/pull/196, enable the appender to append generic interface inputs, also those retrieved from json.Unmarshal.
The json package uses map[string]interface{} and []interface{} values to store arbitrary JSON objects and arrays; it will happily unmarshal any valid JSON blob into a plain interface{} value. The default concrete Go types are:
bool for JSON booleans,
float64 for JSON numbers,
string for JSON strings, and
nil for JSON null.
Depends on https://github.com/marcboeker/go-duckdb/pull/196.
Adds an implicit cast from the source type
float64
to any expected numeric destination (column) type. These changes, and the previous work in https://github.com/marcboeker/go-duckdb/pull/196, enable the appender to append genericinterface
inputs, also those retrieved fromjson.Unmarshal
.https://go.dev/blog/json