Bug #106551 lib/DevAPI/Sesion.js - In-line documentation specifies incorrect return type
Submitted: 24 Feb 2:27 Modified: 28 Jun 22:22
Reporter: Ty Eggen Email Updates:
Status: Closed Impact on me:
None 
Category:Connector for Node.js Documentation Severity:S3 (Non-critical)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[24 Feb 2:27] Ty Eggen
Description:
The in-line documentation for version 8.0.28 show an incorrect return type for the Session.sql method and this consequently affects the public documentation.

Current code:
https://github.com/mysql/mysql-connector-nodejs/blob/232e452767caf43980d6fb06b19c1b2beab4b...
========================================
        /**
         * Creates a new operational context to execute a SQL statement in the
         * database.
         * @function
         * @name module:Session#sql
         * @param {string} statement - SQL statement
         * @returns {Promise<module:SqlResult>}
         */
        sql (statement) {
            return sqlExecute(connection, statement);
        },
====================

How to repeat:
This can be verified by generating the documentation locally or as reflect on the public website:

https://dev.mysql.com/doc/dev/connector-nodejs/8.0/module-Session.html#sql__anchor

Suggested fix:
The existing return type should be changed from SqlResult to SqlExecute.
[24 Feb 5:37] MySQL Verification Team
Hello Ty Eggen,

Thank you for the report and feedback.

regards,
Umesh
[24 Mar 16:30] Philip Olson
Posted by developer:
 
Assigning to Rui who handles source edits; sorry for the delay.
[28 Jun 22:22] Philip Olson
Posted by developer:
 
Thanks Ty for the bug report, it's fixed in the source and will show up in the 8.0.30 release.