We're using the BSON capabilities of the Informix server in order to store data in a separate BSON colum - like additional information for the data row or optional fields that may vary from row to row (e.g. translations to different languages).
With the current Client SDK (v4.50xC5), it is not possible to access the binary representation of that field by issuing a SELECT statement using the Informix.Net.Core driver as the driver currently does not support the GetBytes function for any other field types than BLOBs or BYTEs.
That requires us to either issue multiple bson_value_xxx statements to access all those optional fields -or- to cast the field from BSON to JSON on the server side to then perform the creation of the client-side data object by translating the returned values for a second time.
A more direct approach by returning the byte represenation of the BSON column would have two nice side effects:
a) There's no need for double conversion (either by calling bson_value_xx and then issuing the corresponing GetValue calls from the IDataReader to build up the data object at client side -or- by casting BSON to JSON and then parsing JSON at client side), thus the load on the server is reduced
b) The limit from 32767 characters (currently imposed for a VARCHAR - what the result of the BSON to JSON conversion is) would be omitted
|Who would benefit from this IDEA?||Everyone using BSON columns|
How should it work?
The current implementation of the IDataReader / IfxDataReader class in the Informix C# .Net driver as well as in the Informix .Net.Core driver do not allow the call of the IfxDataReader.GetBytes function on BSON columns.
If the driver would allow us to use the GetBytes function on BSON columns, we could do the following:
Even a more generic approach using the
|Priority Justification||Server Offload, Length limit of value returned by GetString (for ::JSON casts)|
|Client Name||Sportec Solutions AG|
|IBM's success depends on gathering feedback from customers like yourself. Aha Ideas Portal is the third party tool through which IBM Offering Managers gather feedback from customers such as yourself.|
|IBM is a global organization with business processes, management structures, technical systems and service provider networks that cross borders. As such, the information collected through Aha Ideas Portal (Customer Name, Customer Email Address) will be stored by them in the United States, and handled only as per IBM's instructions and policies. Your data (Name and Email Address) will NOT be shared with other IBM customers.|
|In order to safeguard your information in Aha, do not leave your workstation unattended while using this application, log off after using it, and print only if necessary. If you need to make a hardcopy, remember to pick up the print-out immediately, keep it under lock, and destroy it immediately when no longer needed.|
|NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "email@example.com" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions|