![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GdaBlobOp; glong gda_blob_op_get_length (GdaBlobOp *op
); glong gda_blob_op_read (GdaBlobOp *op
,GdaBlob *blob
,glong offset
,glong size
); gboolean gda_blob_op_read_all (GdaBlobOp *op
,GdaBlob *blob
); glong gda_blob_op_write (GdaBlobOp *op
,GdaBlob *blob
,glong offset
); gboolean gda_blob_op_write_all (GdaBlobOp *op
,GdaBlob *blob
);
This object is a base class for individual database providers which support BLOB types. It supports operations to read and write data in a BLOB value (of type GDA_BLOB_TYPE).
Libgda offers two methods to manipulate binary values as two containers: GdaBinary and GdaBlob:
When reading from a data model returned by libgda binary data will often be in a GdaBlob object, and the associated GdaBlobOp object can be used to manipulate the binary object (in a database for example)
When the binary value is created by the user, then there is no point in using a GdaBlob as there can not be any GdaBlobOp object, so the GdaBinary container is enough.
Note that a GdaBlob value will often not contain any data (or only some part of the actual BLOB) and that it's up to the user to use the associated GdaBlobOp object to "load" the data into the container (into the actual process heap).
glong gda_blob_op_get_length (GdaBlobOp *op
);
Opens an existing BLOB. The BLOB must be initialized by
gda_connection_create_blob or obtained from a GValue.
FIXME: gda_connection_create_blob()
no longer exists.
|
an existing GdaBlobOp |
Returns : |
the length of the blob in bytes. In case of error, -1 is returned and the provider should have added an error (a GdaConnectionEvent) to the connection. |
glong gda_blob_op_read (GdaBlobOp *op
,GdaBlob *blob
,glong offset
,glong size
);
Reads a chunk of bytes from the BLOB into blob
.
gboolean gda_blob_op_read_all (GdaBlobOp *op
,GdaBlob *blob
);
Reads the whole contents of the blob manipulated by op
into blob
glong gda_blob_op_write (GdaBlobOp *op
,GdaBlob *blob
,glong offset
);
Writes a chunk of bytes from a blob
to the BLOB accessible through op
.