1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>db del</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB TCL API Reference" /> 10 <link rel="up" href="tclapi.html" title="Chapter 1. Berkeley DB Tcl APIs" /> 11 <link rel="prev" href="db_cursor.html" title="db cursor" /> 12 <link rel="next" href="db_get.html" title="db get" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center"><span class="emphasis"><em>db</em></span> del</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="db_cursor.html">Prev</a> </td> 22 <th width="60%" align="center">Chapter 1. 23 Berkeley DB Tcl APIs 24 </th> 25 <td width="20%" align="right"> <a accesskey="n" href="db_get.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="db_del"></a><span class="emphasis"><em>db</em></span> del</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">db del 39 [-glob] 40 [-txn txnid] 41 key </pre> 42 <p> 43 The <span class="emphasis"><em>db</em></span> <span class="bold"><strong>del</strong></span> 44 command removes key/data pairs from the database. 45 </p> 46 <p> 47 In the presence of duplicate key values, all records associated with 48 the designated key will be discarded. 49 </p> 50 <p> 51 The options are as follows: 52 </p> 53 <div class="itemizedlist"> 54 <ul type="disc"> 55 <li> 56 <p> 57 <span class="bold"><strong>-glob</strong></span> 58 </p> 59 <p> 60 The specified key is a wildcard pattern, and all keys matching that 61 pattern are discarded from the database. The pattern is a simple 62 wildcard, any characters after the wildcard character are ignored. 63 This option only works on databases using the Btree access method. 64 </p> 65 </li> 66 <li> 67 <p> 68 <span class="bold"><strong>-txn txnid</strong></span> 69 </p> 70 <p> 71 If the operation is part of an application-specified transaction, the 72 <span class="bold"><strong>txnid</strong></span> parameter is a transaction 73 handle returned from <span class="emphasis"><em>env</em></span> <span class="bold"><strong>txn</strong></span>. If no transaction handle is specified, 74 but the operation occurs in a transactional database, the operation 75 will be implicitly transaction protected. 76 </p> 77 </li> 78 </ul> 79 </div> 80 <p> 81 The <span class="emphasis"><em>db</em></span> <span class="bold"><strong>del</strong></span> 82 command returns 0 on success, and in the case of error, a Tcl error is 83 thrown. 84 </p> 85 </div> 86 <div class="navfooter"> 87 <hr /> 88 <table width="100%" summary="Navigation footer"> 89 <tr> 90 <td width="40%" align="left"><a accesskey="p" href="db_cursor.html">Prev</a> </td> 91 <td width="20%" align="center"> 92 <a accesskey="u" href="tclapi.html">Up</a> 93 </td> 94 <td width="40%" align="right"> <a accesskey="n" href="db_get.html">Next</a></td> 95 </tr> 96 <tr> 97 <td width="40%" align="left" valign="top"><span class="emphasis"><em>db</em></span> cursor </td> 98 <td width="20%" align="center"> 99 <a accesskey="h" href="index.html">Home</a> 100 </td> 101 <td width="40%" align="right" valign="top"> <span class="emphasis"><em>db</em></span> get</td> 102 </tr> 103 </table> 104 </div> 105 </body> 106</html> 107