{"action":"created","issue":{"url":"https://api.github.com/repos/wankdanker/node-odbc/issues/40","repository_url":"https://api.github.com/repos/wankdanker/node-odbc","labels_url":"https://api.github.com/repos/wankdanker/node-odbc/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/wankdanker/node-odbc/issues/40/comments","events_url":"https://api.github.com/repos/wankdanker/node-odbc/issues/40/events","html_url":"https://github.com/wankdanker/node-odbc/pull/40","id":354332339,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMTIwMTQ4","number":40,"title":"N-API/SQLBindCol changes","user":{"login":"markdirish","id":12288461,"node_id":"MDQ6VXNlcjEyMjg4NDYx","avatar_url":"https://avatars0.githubusercontent.com/u/12288461?v=4","gravatar_id":"","url":"https://api.github.com/users/markdirish","html_url":"https://github.com/markdirish","followers_url":"https://api.github.com/users/markdirish/followers","following_url":"https://api.github.com/users/markdirish/following{/other_user}","gists_url":"https://api.github.com/users/markdirish/gists{/gist_id}","starred_url":"https://api.github.com/users/markdirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdirish/subscriptions","organizations_url":"https://api.github.com/users/markdirish/orgs","repos_url":"https://api.github.com/users/markdirish/repos","events_url":"https://api.github.com/users/markdirish/events{/privacy}","received_events_url":"https://api.github.com/users/markdirish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-27T14:03:28Z","updated_at":"2018-10-01T19:41:10Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/wankdanker/node-odbc/pulls/40","html_url":"https://github.com/wankdanker/node-odbc/pull/40","diff_url":"https://github.com/wankdanker/node-odbc/pull/40.diff","patch_url":"https://github.com/wankdanker/node-odbc/pull/40.patch"},"body":"Completely reworked the package to use [N-API](https://nodejs.org/api/n-api.html), specifically the [node-addon-api](https://github.com/nodejs/node-addon-api) C++ wrapper. This is an engine-agnostic abstraction that is ABI stable, meaning it doesn't need to be recompiled when new node versions are used.\r\n\r\nAlso, retooled the way that the ODBC drivers interact with the database. Currently, node-odbc uses SQLGetData, [which is slow](https://docs.microsoft.com/en-us/sql/relational-databases/native-client-odbc-results/fetching-result-data?view=sql-server-2017). Now uses SQLBindCol and then calls SQLFetch to populate a buffer array, from which N-API data is created and returned to JavaScript. When testing with 100k rows, SQLGetData took 19 minutes, while binding with SQLBindCol and getting data with SQLFetch took 19 seconds.\r\n\r\nMore information can be found at the bottom of the README.md file, including work and testing that still needs to be done."},"comment":{"url":"https://api.github.com/repos/wankdanker/node-odbc/issues/comments/426036647","html_url":"https://github.com/wankdanker/node-odbc/pull/40#issuecomment-426036647","issue_url":"https://api.github.com/repos/wankdanker/node-odbc/issues/40","id":426036647,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjAzNjY0Nw==","user":{"login":"markdirish","id":12288461,"node_id":"MDQ6VXNlcjEyMjg4NDYx","avatar_url":"https://avatars0.githubusercontent.com/u/12288461?v=4","gravatar_id":"","url":"https://api.github.com/users/markdirish","html_url":"https://github.com/markdirish","followers_url":"https://api.github.com/users/markdirish/followers","following_url":"https://api.github.com/users/markdirish/following{/other_user}","gists_url":"https://api.github.com/users/markdirish/gists{/gist_id}","starred_url":"https://api.github.com/users/markdirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdirish/subscriptions","organizations_url":"https://api.github.com/users/markdirish/orgs","repos_url":"https://api.github.com/users/markdirish/repos","events_url":"https://api.github.com/users/markdirish/events{/privacy}","received_events_url":"https://api.github.com/users/markdirish/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T19:41:10Z","updated_at":"2018-10-01T19:41:10Z","author_association":"NONE","body":"I have pushed up some further changes, but the vast majority are just refactoring for readability. @wankdanker any luck determining what was causing the deep error in QueryAsyncWorker? If there is an error in that method, it will return null for the result, so not surprising it cant run fetchAll, just concerning that an error is happening at all."}}
{"actor":{"display_login":"markdirish"}}