Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-163

Support of new C/C callback system for custom data type conversion

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.2.2
    • General
    • None

    Description

      The corresponding feature exists in C/C 3.3

      Attachments

        Activity

          2 new connstring options are introduced - PCALLBACK and RCALLBACK, to enable/disable parameter and result callbacks, respectively. By default (atm) param codecs(functor classes for callbacks called and refered to as codecs) are enabled, while result codecs are disabled. Both options are added to the windows setup dialog.
          Parameter callbacks are used for parameter arrays operations aka bulk commands. Since this is MariaDB feature, they won't be used with other or old MariaDB servers(all currently supported server versions support parameter arrays). Connector use separate callbacks for parameter columns(kinda extension to what c/c does/allows) in the c/c++ subsystem of c/odbc. That allows to have simple, short and easy to read callbacks.
          As well as param callbacks, result codes are also defined for separate columns. Unlike param codecs, for results the connector relies in most cases on C/C service for data type conversions, and uses codecs to skip redundant allocation/copying, and writing converted data directly to application buffers. Codecs work only with SQLFetch, and not with SQLGetData, i.e. with buffers bound using SQLBindCol. That is C/C's limitation.
          Default for parameter callbacks option can be changed. I am considering to make them disabled by default.

          Lawrin Lawrin Novitsky added a comment - 2 new connstring options are introduced - PCALLBACK and RCALLBACK, to enable/disable parameter and result callbacks, respectively. By default (atm) param codecs(functor classes for callbacks called and refered to as codecs) are enabled, while result codecs are disabled. Both options are added to the windows setup dialog. Parameter callbacks are used for parameter arrays operations aka bulk commands. Since this is MariaDB feature, they won't be used with other or old MariaDB servers(all currently supported server versions support parameter arrays). Connector use separate callbacks for parameter columns(kinda extension to what c/c does/allows) in the c/c++ subsystem of c/odbc. That allows to have simple, short and easy to read callbacks. As well as param callbacks, result codes are also defined for separate columns. Unlike param codecs, for results the connector relies in most cases on C/C service for data type conversions, and uses codecs to skip redundant allocation/copying, and writing converted data directly to application buffers. Codecs work only with SQLFetch, and not with SQLGetData, i.e. with buffers bound using SQLBindCol. That is C/C's limitation. Default for parameter callbacks option can be changed. I am considering to make them disabled by default.

          Added support of C/C parameters and result callbacks. Parameter callbacks used for bulk operations only, and mainly supposed to minimize memory allocation, result codecs are used in fetch to bound buffers operations only, and supposed to be faster for some combinations of SQL/C types as less data types recoding are done.
          2 new connstring options are introduced - PCALLBACK and RCALLBACK, to enable/disable parameter and result callbacks, respectively. By default (atm) param codecs are enabled, while result codecs are disabled. Both options are added to the windows setup dialog.

          Lawrin Lawrin Novitsky added a comment - Added support of C/C parameters and result callbacks. Parameter callbacks used for bulk operations only, and mainly supposed to minimize memory allocation, result codecs are used in fetch to bound buffers operations only, and supposed to be faster for some combinations of SQL/C types as less data types recoding are done. 2 new connstring options are introduced - PCALLBACK and RCALLBACK, to enable/disable parameter and result callbacks, respectively. By default (atm) param codecs are enabled, while result codecs are disabled. Both options are added to the windows setup dialog.

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.