As the title asks, is there a way of inserting buffer data into a String/FixedString field?
I havent had much luck with anything other than FORMAT JSONEachRow, but it fails for the FixedString data
await client.insert({
table: table,
values: values, //JS Objects, not serialized in any way
format: 'JSONEachRow',
});
Using toString with hex, base64, utf8, binary, latin1 encodings leads to a TOO_LARGE_STRING_SIZE error
Using toString with ascii causes the first bit to be dropped, converting 0xF0F0 to 0x0000
Is there any other way of inserting JSON data using the client?
I can think of using exec with unhex(val), but that'd be quite the hassle when dealing with large tables since I'd need to type all of the columns and parameters with their respective types
As the title asks, is there a way of inserting buffer data into a String/FixedString field?
I havent had much luck with anything other than FORMAT JSONEachRow, but it fails for the FixedString data
Using toString with hex, base64, utf8, binary, latin1 encodings leads to a TOO_LARGE_STRING_SIZE error
Using toString with ascii causes the first bit to be dropped, converting 0xF0F0 to 0x0000
Is there any other way of inserting JSON data using the client?
I can think of using
execwithunhex(val), but that'd be quite the hassle when dealing with large tables since I'd need to type all of the columns and parameters with their respective types