This class supports handling and manipulating Character Large Objects (CLOBs) in databases. Large object data access is supported only for DB2 database mappings.
Inherits from:
IDABase
|
+----IDALobDO
|
+----IDAClobDO
Public Functions by Category
public: IDAClobDO(); IDAClobDO( const IDatastoreDB2 &dsm ); IDAClobDO( const IString& aString, const IDatastoreDB2 &dsm ); IDAClobDO( const IDAClobLocator &loc );
Supported Platforms Windows OS/2 AIX Y Y Y
public: IDAClobDO subClobDO( unsigned long startpos, unsigned long length ) const;Use this method to return an IDAClobDO object containing the specified portion of the current IDAClobDO object. To specify the portion, pass in a start position (where the first byte is numbered 1) and a length (in bytes).
Supported Platforms Windows OS/2 AIX Y Y Y
The following functions provide access to extended scalar functions for CLOBs that DB2 also provides.
public: long ASCII() const;Returns the ASCII code value of the leftmost character of the CLOB, as a long.
public: void CONCAT(const IDAClobDO& aLob);Concatenates the passed-in CLOB to the end of the current CLOB.
public: void SUBSTRING( IString & resultString, unsigned long startpos, unsigned long length) const;Places into the result string the portion of the current CLOB defined by the specified start postion and the length.
public: void INSERT( unsigned long startpos, unsigned long insertLength, const char* pstring);Inserts the passed-in string (pstring) into the current CLOB at the start position; insertLength is the length of pstring.
public: void REPLACE(const char* string1, const char* string2);Replaces all occurences of string1 within the current CLOB with string2.
public: long LOCATE(const char* pstring, unsigned long startPos=1) const;Returns the starting position of the first occurrence of pstring within the current CLOB. The search for the first occurrence of pstring starts at the first character in the LOB, unless the optional parameter, startPos, is specified. If the start position is specified, the search begins with the specified position, where the first character is numbered 1. If no occurrence of pstring is found within the CLOB, the value 0 (zero) is returned.
public: void LCASE();Converts all uppercase characters in the CLOB to lower case.
public: void LTRIM();Removes all leading blank characters from the CLOB.
public: void RTRIM();Removes all trailing blank characters from the CLOB.
public: IString LEFT(unsigned long count) const;Returns the specified number of characters from the left-hand side of the CLOB.
public: IString RIGHT(unsigned long count) const;Returns the specified number of characters from the right-hand side of the CLOB.
public: static char CHAR_OF(int code);Returns the ASCII character corresponding to the passed-in int. Pass in a number between 0 and 255; otherwise, the return value is null.
public: static void REPEAT( IString& resultString, const IString & pstring, unsigned long count);The IString resultString will contain pstring, repeated count times.
static void SPACE(IString & resultString, unsigned long count);The IString resultString will contain count number of space characters.
Supported Platforms Windows OS/2 AIX Y Y Y
Public Operators
public:
IDAClobDO operator+( const IDAClobDO& aLob ) const;
IDAClobDO operator+( const IString& aString ) const;
friend IDAClobDO operator+( const IString& aString,
const IDAClobDO& aLob );
Use this operator to add two CLOBs together, a CLOB and a string, or a string and a CLOB.
Supported Platforms Windows OS/2 AIX Y Y Y
Protected Functions
protected: IDALocator& getLocator() const;Use this method to return the locator pointing to the LOB, if it is on the server. Warning: If you use this locator to manipulate the LOB, none of the provided Data Access class library methods will be able to access the object.
Supported Platforms Windows OS/2 AIX Y Y Y
Inherited from IDALobDO:
Public Functions
