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

          Lawrin Lawrin Novitsky created issue -
          ralf.gebhardt Ralf Gebhardt made changes -
          Field Original Value New Value
          Fix Version/s 3.2 [ 23304 ]
          Fix Version/s 3.1 [ 22900 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Summary Support of new C/C callbacs system for custom data type conversion Support of new C/C callback system for custom data type conversion
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 88466 ] MariaDB v4 [ 128550 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Description The corresponding feature exists in C/C 3.3
          ralf.gebhardt Ralf Gebhardt made changes -
          Issue Type Task [ 3 ] New Feature [ 2 ]
          Lawrin Lawrin Novitsky made changes -
          Fix Version/s 3.2.2 [ 29606 ]
          Fix Version/s 3.2 [ 23304 ]
          Lawrin Lawrin Novitsky made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          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.
          Lawrin Lawrin Novitsky made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Lawrin Lawrin Novitsky made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Stalled [ 10000 ]

          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.
          Lawrin Lawrin Novitsky made changes -
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]

          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.