You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In recent versions of mysql2, the changedRows result set header is not deprecated (see below).
The documentation says to use affectedRows instead, which really isn't the same information though.
Curious about the rationale for this deprecation and possible alternative for this property?
Many thanks
declareinterfaceResultSetHeader{constructor: {name: 'ResultSetHeader';};affectedRows: number;fieldCount: number;info: string;insertId: number;serverStatus: number;warningStatus: number;/** * @deprecated * `changedRows` is deprecated and might be removed in the future major release. Please use `affectedRows` property instead. */changedRows: number;}
The text was updated successfully, but these errors were encountered:
@wellwelwel is there a way to deprecate a field in TS? Quick googling gives me jsdock comment option "@deprecated reason description" - is this the best option?
Reasons I want to remove completely changedRows:
it's confusing given affectedRows exist
not part of the protocol and is extracted from human readable message. Will break if wording is changed or server is localised or non-mysql server ( MariaDB etc ) choses to use different message.
Re 0 vs undefined when message can't be parsed - probably not that important right now
Thanks a ton @wellwelwel for your quick reply.
"Not part of the protocol" comes as a surprise as this information is interesting for multiple use cases, but I get it now.
Cheers
Hello gents,
In recent versions of mysql2, the
changedRows
result set header is not deprecated (see below).The documentation says to use
affectedRows
instead, which really isn't the same information though.Curious about the rationale for this deprecation and possible alternative for this property?
Many thanks
The text was updated successfully, but these errors were encountered: