OTL 4.0, OTL Long String, Long Unicode String  classes

OTL Long String, Long Unicode String classes

These classes are used in operations with Large Objects (LOB). In OTL 4.0, otl_long_string can hold a LOB of any type as well as RAW / BINARY:
otl_long_unicode_string is specialized for Unicode character based large strings. otl_long_unicode_string can hold the following datatypes: In the case if Unicode OTL is enabled by #define OTL_UNICODE, otl_long_string needs to be used for Oracle LONG RAWs, BLOBs, MS SQL IMAGEs, DB2 BLOBs, etc (large binary strings, generally speaking), because they still remain the large byte strings, without any character semantic attached.

OTL 4.0 defines the following bind variable datatypes for manipulating LOBs:

Large Objects (LOBs) and NULLs

Behavior of LOBs is slightly different from the other table column datatypes as far as NULLs are concerned:
class otl_long_string{
public:
     unsigned char* v;
     otl_long_string(const void* external_buffer,
                     const int buffer_size,
                     const int input_length=0
                    );
     void set_len(const int len=0);
          void set_last_piece(const bool last_piece=false);
     int len(void);
     unsigned char& operator[](int ndx);

}; // end of otl_long_string

class otl_long_unicode_string: public otl_long_string{
public:
     otl_long_unicode_string(const void* external_buffer,
                             const int buffer_size,
                             const int input_length=0
                            );
     void set_len(const int len=0);
     int len(void);
     unsigned short& operator[](int ndx);
}; // end of otl_long_unicode_string

Prev NextContentsGo Home

Copyright © 1996, 2007, Sergei Kuchin, email: skuchin@ispwest.com, skuchin@gmail.com .

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies.