Skip to Content
Berkeley DB
book

Berkeley DB

by Sleepycat™ Software, Inc.
June 2001
Intermediate to advanced content levelIntermediate to advanced
688 pages
19h 18m
English
Sams
Content preview from Berkeley DB

Storing Records with a Cursor

The DBcursor→c_put function is the standard interface for storing records into the database with a cursor. In general, DBcursor→c_put takes a key and inserts the associated data into the database at a location controlled by a specified flag.

There are several flags that you can set to customize storage:

  • DB_AFTER Create a new record immediately after the record currently referenced by the cursor.

  • DB_BEFORE Create a new record immediately before the record currently referenced by the cursor.

  • DB_CURRENT_PUT Replace the data part of the record currently referenced by the cursor.

  • DB_KEYFIRST Create a new record as the first of the duplicate records for the supplied key.

  • DB_KEYLAST Create a new record as the last of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Berkeley DB Book

The Berkeley DB Book

Himanshu Yadava
Linux Recipes for Oracle DBAs

Linux Recipes for Oracle DBAs

Darl Kuhn, Charles Kim, Bernard Lopuz
Fedora Linux

Fedora Linux

Chris Tyler

Publisher Resources

ISBN: 0735710643Purchase book