I want to access the fields property after I have made a query. In the normal async mysql package this would be the third argument passed into the callback of the query-function.
The current implementation always only returns the result-rows. To enable it to return both, the result-rows and the fields, the then-mysql package (also authored by you) would have to be changed as well. In connection.js only a small change would have to be made to the lines 45-47, so when the Promise is resolved it also returns the fields. However, in order not to break existing code, either a second version of the query-method would have to be added which is nearly a clone of the existing one, or you could add a parameter that defaults to the current behaviour, but can be configured so the promise returns e.g. an object like { result, fields }.
With that change in then-mysql, it would be easy to adapt sync-mysql to work with it.
I could write that myself and provide a PR, but I'm not sure in what style you would like the change to be implemented.
I want to access the fields property after I have made a query. In the normal async mysql package this would be the third argument passed into the callback of the query-function.
The current implementation always only returns the result-rows. To enable it to return both, the result-rows and the fields, the then-mysql package (also authored by you) would have to be changed as well. In connection.js only a small change would have to be made to the lines 45-47, so when the Promise is resolved it also returns the fields. However, in order not to break existing code, either a second version of the query-method would have to be added which is nearly a clone of the existing one, or you could add a parameter that defaults to the current behaviour, but can be configured so the promise returns e.g. an object like { result, fields }.
With that change in then-mysql, it would be easy to adapt sync-mysql to work with it.
I could write that myself and provide a PR, but I'm not sure in what style you would like the change to be implemented.