From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/api_reference/C/dbstream_write.html | 223 +++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 docs/api_reference/C/dbstream_write.html (limited to 'docs/api_reference/C/dbstream_write.html') diff --git a/docs/api_reference/C/dbstream_write.html b/docs/api_reference/C/dbstream_write.html new file mode 100644 index 00000000..6f9ff886 --- /dev/null +++ b/docs/api_reference/C/dbstream_write.html @@ -0,0 +1,223 @@ + + + + + + DB_STREAM->write() + + + + + + + + + +
+
+
+
+

DB_STREAM->write()

+
+
+
+
#include <db.h>
+
+int
+DB_STREAM->write(DB_STREAM *dbs, DBT *data, db_off_t offset, 
+                 u_int32_t flags); 
+

+ The DB_STREAM->write() method writes data + to an existing BLOB object in the database. This method writes + data contained in the DBT + data to the BLOB stream. Data is + written into the stream starting at the position indicated by + offset. The amount of data + written is determined by the size field in the + DBT. +

+

+ If this method writes data in the middle of the BLOB, it will + overwrite existing data, instead of shifting it. If this method + writes data to the end of the BLOB, the data is appended to the + existing BLOB. You can determine how large a BLOB is using + DB_STREAM->size(). +

+

+ To open a stream, use DBC->db_stream(). +

+

+ Unless otherwise specified, the + DB_STREAM->write() + + method returns a non-zero error value on failure and 0 on success. + + + +

+
+
+
+
+

Parameters

+
+
+
+
+
+
+
+

data

+
+
+
+

+ The data parameter is + the DBT containing the + data to be written to the BLOB. The amount of data to be + written is determined by the DBT's + size field. +

+
+
+
+
+
+

offset

+
+
+
+

+ The offset parameter + identifies the position in the BLOB where the write + operation will begin. +

+
+
+
+
+
+

flags

+
+
+
+

+ The flags parameter must be set to 0 + or the following value: +

+
+
    +
  • +

    + DB_STREAM_SYNC_WRITE +

    +

    + A sync to disk operation is performed on the + stream at the end of the write operation. By + default, the sync is performed only when the + stream is closed using DB_STREAM->close(). Note that + this flag can also be specified when the stream is + created using DBC->db_stream(), in which case the sync + behavior becomes the default behavior for this + stream instance. +

    +
  • +
+
+
+
+
+
+
+
+

Errors

+
+
+
+

+ The DB_STREAM->write() + + method may fail and return one of the following non-zero errors: + + + +

+
+
+
+
+

EINVAL

+
+
+
+

+ An invalid flag value or parameter was specified; or if the + stream is read-only; or if the input DBT was + configured with + DB_DBT_PARTIAL. +

+
+
+
+
+
+
+

Class

+
+
+
+

+ DB_STREAM +

+
+
+
+
+
+

See Also

+
+
+
+

+ BLOBs and Related Methods +

+
+
+ + + -- cgit v1.2.1