I am using Oracle Occi bulk interface, where oracle can load huge amount of data of string into a buffer of char*. Say if the string is 20 bytes and record size is 100, then the buffer is char[21*100], with one char of \0 marking the end of every string record.
Now my issue is, I want to save this buffer for later bulk insertion, deletion or update to oracle. Meanwhile I still want to use std::string to operate on the record, like changing the value of the string and want the underlying char* to be changed simultaneously.
So the question is, how can I do a constructor for string like std::string(char* please_dont_care), and ensure that string doesn't release the char* upon destruction?
Thank you.
Aucun commentaire:
Enregistrer un commentaire