Open dhurtrci opened 6 months ago
How about a simple option like noWarnings
or hideWarnings
at the connection level?
That could solve this issue and the #2471.
Do you think that's a bad idea/practice?
Can someone explain this code part to me? (text_parser.js line 91)
string: function (encoding = field.encoding) { if (field.columnType === Types.JSON && encoding === field.encoding) {
For me this If must always be true if field.columnType is a JSON or?
I would like the console logging in the code below (in connection_config.js) to be removed. Also I would ask that this is never made into a thrown error (as is threatened).
My reasons are that some other libraries (e.g. loopback-connector-mysql) add 'harmless' extra (non MySql/MariaDB) properties to the object passed here (for other purposes) which leads to this error being logged (and the extra properties do not actually cause problems).
Additionally, having this check (and - more alarmingly - threatening to throw an error in future!) means that the code in mysql2 has to be sure to always keep an up-to-date list of options. Additionally it neglects that different versions of MySQL/MariaDB might in fact have a slightly different list of valid options.
My opinion is that the logging (and check of property name validity) should be removed.