summaryrefslogtreecommitdiff
path: root/db/docs/gsg/C/secondaryDelete.html
diff options
context:
space:
mode:
Diffstat (limited to 'db/docs/gsg/C/secondaryDelete.html')
-rw-r--r--db/docs/gsg/C/secondaryDelete.html46
1 files changed, 10 insertions, 36 deletions
diff --git a/db/docs/gsg/C/secondaryDelete.html b/db/docs/gsg/C/secondaryDelete.html
index a62f28b34..d39ebdab5 100644
--- a/db/docs/gsg/C/secondaryDelete.html
+++ b/db/docs/gsg/C/secondaryDelete.html
@@ -43,10 +43,10 @@
database and simply allow DB to manage the secondary modifications for you.
</p>
<p>
- However, as a convenience, you can delete a
+ However, as a convenience, you can delete
<span>secondary database</span>
- record directly. Doing so causes the associated primary key/data pair to be deleted.
+ records directly. Doing so causes the associated primary key/data pair to be deleted.
This in turn causes DB to delete all
<span>secondary database</span>
@@ -72,38 +72,12 @@
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
+
+ <span>
You can delete a secondary database record using the previously
- described mechanism only if:
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- the
-
- <span>secondary key extractor function</span>
-
- returns
-
- <span><tt class="literal">0</tt></span>
- (see <a href="keyCreator.html">Implementing Key
-
- <span>Extractors</span>
- </a> for information on this
-
- <span>callback).</span>
- </p>
- </li>
- <li>
- <p>
- the primary database is opened for write access.
- </p>
- </li>
- </ul>
- </div>
- <p>
- If either of these conditions are not met, then no delete operations can be performed on the secondary
- database.
+ described mechanism
+ </span>
+ only if the primary database is opened for write access.
</p>
</div>
<p>For example:</p>
@@ -116,7 +90,7 @@
DB *dbp, *sdbp; /* Primary and secondary DB handles */
DBT key; /* DBTs used for the delete */
int ret; /* Function return value */
-char *search_name = "John Doe"; /* Name to delete */
+char *search_name = &quot;John Doe&quot;; /* Name to delete */
/* Primary */
ret = db_create(&amp;dbp, NULL, 0);
@@ -139,7 +113,7 @@ if (ret != 0) {
/* open the primary database */
ret = dbp-&gt;open(dbp, /* DB structure pointer */
NULL, /* Transaction pointer */
- "my_db.db", /* On-disk file that holds the database.
+ &quot;my_db.db&quot;, /* On-disk file that holds the database.
* Required. */
NULL, /* Optional logical database name */
DB_BTREE, /* Database access method */
@@ -152,7 +126,7 @@ if (ret != 0) {
/* open the secondary database */
ret = sdbp-&gt;open(sdbp, /* DB structure pointer */
NULL, /* Transaction pointer */
- "my_secdb.db", /* On-disk file that holds the database.
+ &quot;my_secdb.db&quot;, /* On-disk file that holds the database.
* Required. */
NULL, /* Optional logical database name */
DB_BTREE, /* Database access method */