-
Notifications
You must be signed in to change notification settings - Fork 30
Split conversion functions into own module #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The setup API is meant to assist with installation of the driver.
stderr redirect will always work
- prompt_user_config() will pop up a dialog-box for connection config; - prompt_user_overwrite() will confirm with the user that a config is to be overwritten.
builds/.gitignore can get cleaned away, move its content into top .gitignore
- add a DSN to start from; - remove small code duplication in SQLDriverConnect; - change config priorities in ConfigDSN(), as follows (most relevant first): . 00-list received as parameter; . registry values; . defaults.
The values from the registry are read into a static buffer, indexed for each entry into the esodbc_dsn_attrs_st structure. Make sure that the indexing is done only for those values in the Registry that have a correspondence in the structure. Also, use SQLWCHAR explicitely instead of the TCHAR (should be same values for Unicode compilation, but might generate issues later.)
Moved from all-static/all-dynamic to all-static, to simplify code management.
- add a few more attributes to SQLGetInfo, some describing SQLGetData extentions - WIP on SQLGetData: set-up the temporary binding-unbinding on the requested column. Since SQLGetData requires no state maintenance except position in the source data, the binding is done with a static ARD; if the column index is lower-or-equal to a constant (128), the ARD will also use a static array of records; otherwise a new array is allocated-freed.
Also: - replace boolean conversion function, delegate that to the long long conversion function; - unify functions transfering SQLWCHAR and SQLCHAR strings to application to minimize code duplication; - build.bat : stop on error and propagate it to script exit; - CMakeLists.txt: add flag for parallel building.
move around the 0-terminator accounting, for better code clarity
- moved respective functions to convert.[ch]
a static array of 350K proves too large for the default 1MB stack, so allocate it on heap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, sorry for that (last thing done on a Friday). |
- moved respective functions to convert.[ch]
a static array of 350K proves too large for the default 1MB stack, so allocate it on heap
…rch-sql-odbc into feature/convert_split
This PR will now still show the full set of changes, but the diff between the elastic/master and bpintea/convert_split should be available now ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The query.c module contained all the data conversion functions (SQL --> C, for columns --> app, as well as C --> SQL, for app --> parameters). It thus became quite large and hard to navigate.
This PR splits the conversion functions into own module, convert.[ch] and adds some small changes needed for that.