CTWave Blob ID Functions

Name

CTWave Blob ID Functions -- CTWave Blob ID management functions.

Synopsis


#include ctwave/ctwave-blob-id.h


struct      CTWaveBlobId;

CTWaveBlobId* ctwave_blob_id_new            ();
void        ctwave_blob_id_del              (CTWaveBlobId *blobid);
void        ctwave_blob_id_copy             (CTWaveBlobId *blobid,
                                             CTWaveBlobId *src_blobid);
int         ctwave_blob_id_equal            (CTWaveBlobId *lblobid,
                                             CTWaveBlobId *rblobid);
int         ctwave_blob_id_nequal           (CTWaveBlobId *lblobid,
                                             CTWaveBlobId *rblobid);
void        ctwave_blob_id_get              (CTWaveBlobId *blobid,
                                             WaveMemBuf *buf);
void        ctwave_blob_id_get_b            (CTWaveBlobId *blobid,
                                             WaveMemBuf *buf);
void        ctwave_blob_id_set              (CTWaveBlobId *blobid,
                                             const WaveMemBuf *buf);
void        ctwave_blob_id_set_b            (CTWaveBlobId *blobid,
                                             const WaveMemBuf *buf);
WaveResult  ctwave_blob_id_update           (CTWaveBlobId *blobid);

Description

These functions allow for the manipulation of Blobs, ie. text or binary columns.

Details

struct CTWaveBlobId

struct CTWaveBlobId {
  gshort is_not_null;
  gshort is_not_modified;

  CTWaveBlob *blob;
};

Use at your own risk.


ctwave_blob_id_new ()

CTWaveBlobId* ctwave_blob_id_new            ();

Constructs a new CTWave Blob ID Object.

Returns : The CTWave Connection Blob ID Object.


ctwave_blob_id_del ()

void        ctwave_blob_id_del              (CTWaveBlobId *blobid);

Destroys the specified blob object, frees any memory that the blob was holding.

blobid: CTWave Blob ID object.


ctwave_blob_id_copy ()

void        ctwave_blob_id_copy             (CTWaveBlobId *blobid,
                                             CTWaveBlobId *src_blobid);

Copies one blob object to another.

blobid: Destination blob.
src_blobid: Source blob.


ctwave_blob_id_equal ()

int         ctwave_blob_id_equal            (CTWaveBlobId *lblobid,
                                             CTWaveBlobId *rblobid);

Compares two blob objects. Currently only checks to see if they are not null. Use ctwave_blob_id_nequal instead.

lblobid: Blob one.
rblobid: Blob Two.
Returns : TRUE or FALSE.


ctwave_blob_id_nequal ()

int         ctwave_blob_id_nequal           (CTWaveBlobId *lblobid,
                                             CTWaveBlobId *rblobid);

Compares two blob objects and returns TRUE if they are not equal.

lblobid: Blob one.
rblobid: Blob Two.
Returns : TRUE or FALSE.


ctwave_blob_id_get ()

void        ctwave_blob_id_get              (CTWaveBlobId *blobid,
                                             WaveMemBuf *buf);

Fills the WaveMemBuf object with blob's contents. The function ctwave_query_read should be called first to fill the blob.

blobid: Source Blob object.
buf: Destination WaveMemBuf object.


ctwave_blob_id_get_b ()

void        ctwave_blob_id_get_b            (CTWaveBlobId *blobid,
                                             WaveMemBuf *buf);

Fills the WaveMemBuf object with blob's contents. The function ctwave_query_read should be called first to fill the blob. This function is used for binary data.

blobid: Source Blob object.
buf: Destination WaveMemBuf object.


ctwave_blob_id_set ()

void        ctwave_blob_id_set              (CTWaveBlobId *blobid,
                                             const WaveMemBuf *buf);

Fills the blob object with the contents of the MemBuf. The function ctwave_blob_id_udpate should be called next to save the data in Sybase.

blobid: Destination Blob object.
buf: Source WaveMemBuf object.


ctwave_blob_id_set_b ()

void        ctwave_blob_id_set_b            (CTWaveBlobId *blobid,
                                             const WaveMemBuf *buf);

Fills the blob object with the contents of the MemBuf. The function ctwave_blob_id_udpate should be called next to save the data in Sybase. This function is used for binary data.

blobid: Destination Blob object.
buf: Source WaveMemBuf object.


ctwave_blob_id_update ()

WaveResult  ctwave_blob_id_update           (CTWaveBlobId *blobid);

Saves the contents of the blob object to Sybase.

blobid: Blob object.
Returns : WAVE_OK or WAVE_FAIL.