Library Version 12.1.6.0

Binary Large Object Support
Prev | Chapter 9. Upgrading Berkeley DB 11.2.5.3 applications to Berkeley DB 12.1.6.0 | Next

## Binary Large Object Support

Berkeley DB now has improved facilities for managing binary large objects (blobs). There is a new streaming interface to efficiently read and write blobs. There are new configuration interfaces to set an optional size threshold above which an object is created as a blob, and to manage the location of blob storage. A new SQL pragma enables SQL users to set a similar optional size threshold above which rows are stored internally in Berkeley DB as blobs.

### New Functions

- `DBC->db_stream()`
- `DB_STREAM->close()`
- `DB_STREAM->read()`
- `DB_STREAM->size()`
- `DB_STREAM->write()`
- `DB_ENV->set_blob_threshold()`
- `DB_ENV->get_blob_threshold()`
- `DB->set_blob_threshold()`
- `DB->get_blob_threshold()`
- `DB_ENV->set_blob_dir()`
- `DB_ENV->get_blob_dir()`
- `DB->set_blob_dir()`
- `DB->get_blob_dir()`

### New Flags Accepted by Blob Streaming Interfaces

- DB_STREAM_READ — accepted by DBC->db_stream()
- DB_STREAM_WRITE — accepted by DBC->db_stream()
- DB_STREAM_SYNC_WRITE — accepted by DBC->db_stream() and DB_STREAM->write()

### Other New Flags

- DB_DBT_BLOB — Used on the data DBT accepted by DB->put() and DBC->put() to indicate that the DBT is a blob.
- DB_LOG_BLOB — Accepted by DB_ENV->log_set_config() and DB_ENV->log_get_config() to indicate full logging of blobs.

### New Pragma

- `PRAGMA large_record_opt[=n]`

Prev | Up | Next
Chapter 9. Upgrading Berkeley DB 11.2.5.3 applications to Berkeley DB 12.1.6.0 | Home | Replication Views