Commit c550d7f6 authored by -urso-'s avatar -urso-

Doc update and added new example exmaples/ext.html

darcs-hash:9551adee01df1f1001a95333de87eaf055d5621a
parent 0906f019
Thu Jun 1 17:56:50 CEST 2006 -urso-@web.de
* added package bdb-ext-playground for testing the dlast db extensions (db-ext-env, db-ext and ext-cursor)
Fri May 19 01:36:40 CEST 2006 -urso-@web.de
* made changes for using secondary databases in package 'bdb' available
......
Thu Jun 1 17:54:51 CEST 2006 -urso-@web.de
* introduced classes db-ext-env, db-ext and ext-cursor which store buffer reader and writer functions in its instances, thus user only needs to work with objects
Fri May 26 01:20:24 CEST 2006 -urso-@web.de
* fixed some bugs preventing secondary databases to work when db-txn is used as database representation
......
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>BDB</title>
<link rel="stylesheet" type="text/css" href="../style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
</head>
<body>
<div class="header">
<h1>BDB</h1>
<h2>Berkeley DB CFFI bindings</h2>
</div>
<h3>Example Usage (X Databases)</h3>
<pre>
BDB-PLAYGROUND&gt; (in-package :bdb-ext-playground)
#&lt;PACKAGE "BDB-EXT-PLAYGROUND"&gt;
BDB-EXT-PLAYGROUND&gt; (setq *env* (db-env-open "/home/main/tdb"
:init-txn t
:init-log t
:init-lock t
:init-mpool t
:create t
:buf-reader #'cbuf-reader
:buf-writer #'cbuf-writer))
#&lt;BDB::DB-EXT-ENV {A92EEE1}&gt;
BDB-EXT-PLAYGROUND&gt; (setq *db* (db-open "test.db" :env *env* :auto-commit t :create t))
#&lt;BDB::DB-EXT {ABB6459}&gt;
BDB-EXT-PLAYGROUND&gt; (db-put *db* 1 '(max mustermann))
T
BDB-EXT-PLAYGROUND&gt; (db-put *db* 2 '(kater karlo))
T
BDB-EXT-PLAYGROUND&gt; (db-get *db* 1)
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (db-get *db* 12)
NIL
BDB-EXT-PLAYGROUND&gt; (db-get *db* 2)
(KATER KARLO)
BDB-EXT-PLAYGROUND&gt; (db-get *db* 1)
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (db-get *db* 3)
NIL
BDB-EXT-PLAYGROUND&gt; (setq *cursor* (db-cursor *db*))
#&lt;BDB::EXT-CURSOR {B99BA91}&gt;
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
1
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
2
(KATER KARLO)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
NIL
NIL
BDB-EXT-PLAYGROUND&gt; (db-cursor-close *cursor*)
NIL
BDB-EXT-PLAYGROUND&gt; (db-close *db*)
T
BDB-EXT-PLAYGROUND&gt; (db-env-close *env*)
NIL
;;;; deleted database...
BDB-EXT-PLAYGROUND&gt; (setq *env* (db-env-open "/home/main/tdb"
:init-txn t
:init-log t
:init-lock t
:init-mpool t
:create t
:buf-reader #'cbuf-reader
:buf-writer #'cbuf-writer))
#&lt;BDB::DB-EXT-ENV {BC41169}&gt;
BDB-EXT-PLAYGROUND&gt; (setq *db* (db-open "test.db" :env *env* :auto-commit t :create t))
#&lt;BDB::DB-EXT {BCF4141}&gt;
BDB-EXT-PLAYGROUND&gt; (setq *sdb* (db-open "stest.db" :env *env* :auto-commit t :create t :dup-sort t))
#&lt;BDB::DB-EXT {BD4EA21}&gt;
BDB-EXT-PLAYGROUND&gt; (bdb:db-associate *db* *sdb* (lambda (db key data)
(values t (first data))))
T
BDB-EXT-PLAYGROUND&gt; (db-put *db* 1 '(max mustermann))
T
BDB-EXT-PLAYGROUND&gt; (db-put *db* 2 '(kater karlo))
T
BDB-EXT-PLAYGROUND&gt; (db-get *db* 1)
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (setq *cursor* (db-cursor *db*))
#&lt;BDB::EXT-CURSOR {ADE8121}&gt;
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
1
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
2
(KATER KARLO)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
NIL
NIL
BDB-EXT-PLAYGROUND&gt; (db-cursor-close *cursor*)
NIL
BDB-EXT-PLAYGROUND&gt; (setq *cursor* (db-cursor *sdb*))
#&lt;BDB::EXT-CURSOR {B728189}&gt;
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
KATER
(KATER KARLO)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
MAX
(MAX MUSTERMANN)
BDB-EXT-PLAYGROUND&gt; (db-cursor-get *cursor* :next t)
NIL
NIL
BDB-EXT-PLAYGROUND&gt; (db-cursor-close *cursor*)
T
BDB-EXT-PLAYGROUND&gt; (db-close *sdb*)
T
BDB-EXT-PLAYGROUND&gt; (db-close *db*)
T
BDB-EXT-PLAYGROUND&gt; (db-env-close *env*)
NIL
BDB-EXT-PLAYGROUND&gt; ;;bye bye
</pre>
<p> </p>
<div class="footer">
<a href="mailto:-urso-@web.de">Email</a>
</div>
<div class="check">
<a href="http://validator.w3.org/check/referer"> Valid XHTML 1.0 Strict</a>
</div>
</body>
</html>
......@@ -12,7 +12,7 @@
<div class="header">
<h1>BDB</h1>
<h2>Berkeley DB CFFI bindings</h2>
latest Update: Friday 26 May, 2006 1:42(MET)
latest Update: Thursday 1 June, 2006 18:08(MET)
</div>
<h3>Introduction</h3>
......@@ -147,6 +147,7 @@
<li><a href="examples/simple.html">Simple db Example</a></li>
<li><a href="examples/secondary.html">Secondary Databases</a></li>
<li><a href="examples/txn.html">Transactions</a></li>
<li><a href="examples/ext.html">DB-Ext Test</a></li>
</ol>
<h3>Mailing Lists</h3>
......
......@@ -45,6 +45,8 @@
<span class="paren">(</span><span class="paren">(</span>:module :src
:components <span class="paren">(</span><span class="paren">(</span>:file &quot;packages&quot;<span class="paren">)</span>
<span class="paren">(</span>:file &quot;util&quot;
:depends-on <span class="paren">(</span>&quot;packages&quot;<span class="paren">)</span><span class="paren">)</span>
<span class="paren">(</span>:file &quot;ext-util&quot;
:depends-on <span class="paren">(</span>&quot;packages&quot;<span class="paren">)</span><span class="paren">)</span><span class="paren">)</span><span class="paren">)</span><span class="paren">)</span>
:depends-on <span class="paren">(</span>:cl-store :bdb<span class="paren">)</span><span class="paren">)</span></span></pre
>
......
......@@ -19,8 +19,8 @@
>prev</a
> | <span class="dead-nav-link"
>up</span
> | <span class="nav-link"
>next</span
> | <a href="XDatabase_0020functions.html"
>next</a
> | <a href="index.html"
>toc</a
></div
......@@ -84,7 +84,8 @@
>Method (DB-ASSOCIATE DB-TXN DB-TXN T)</a
> </p
></div
></div
>
</div
></div
></body
></html
......
......@@ -34,6 +34,10 @@
#:db-associate<span class="paren">)</span><span class="paren">)</span></span></pre
>
<pre class="code"
><span class="first-line"><span class="paren">(</span>defpackage bdb-ext-playground</span><span class"body">
<span class="paren">(</span>:use :cl :cl-store :bdb<span class="paren">)</span><span class="paren">)</span></span></pre
>
</div
></div
></body
......
<html
><head
><title
>Berkley DB Playground</title
><link href="style.css" rel="stylesheet"
/><link title="Print" href="print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><h1 class="title"
>Berkley DB Playground</h1
><div class="contents"
><h2
><a name="XDatabase_0020functions"
>XDatabase functions</a
>&nbsp;</h2
><div class="nav-links"
><a class="nav-link" href="Database_0020functions.html"
>prev</a
> | <span class="dead-nav-link"
>up</span
> | <span class="nav-link"
>next</span
> | <a href="index.html"
>toc</a
></div
>
<pre class="code"
><span class="first-line"><span class="paren">(</span>setf <span class="paren">(</span>symbol-function 'cbuf-writer<span class="paren">)</span></span><span class"body">
<span class="paren">(</span>make-cbuffer-writer #'cl-store:store<span class="paren">)</span><span class="paren">)</span></span></pre
>
<pre class="code"
><span class="first-line"><span class="paren">(</span>setf <span class="paren">(</span>symbol-function 'cbuf-reader<span class="paren">)</span></span><span class"body">
<span class="paren">(</span>make-cbuffer-reader #'cl-store:restore<span class="paren">)</span><span class="paren">)</span></span></pre
>
</div
></div
></body
></html
>
\ No newline at end of file
......@@ -24,6 +24,10 @@
><a href="Database_0020functions.html"
>Database functions</a
></div
><div class="contents-heading-1"
><a href="XDatabase_0020functions.html"
>XDatabase functions</a
></div
><h2
>Indexes</h2
><div class="contents-heading-1"
......
......@@ -49,6 +49,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-CURSOR_0020DB-EXT_0029.html" name="method_005FBDB_003A_003A_0028DB-CURSOR_0020DB-EXT_0029"
>Method (DB-CURSOR DB-EXT)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-CURSOR-CLOSE_0020CURSOR_0029.html" name="method_005FBDB_003A_003A_0028DB-CURSOR-CLOSE_0020CURSOR_0029"
......@@ -65,6 +73,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-CURSOR-GET_0020EXT-CURSOR_0029.html" name="method_005FBDB_003A_003A_0028DB-CURSOR-GET_0020EXT-CURSOR_0029"
>Method (DB-CURSOR-GET EXT-CURSOR)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003ABUILD-CURSOR-GET-FUNCTION.html" name="function_005FBDB_003A_003ABUILD-CURSOR-GET-FUNCTION"
......@@ -81,6 +97,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-CURSOR-PUT_0020EXT-CURSOR_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028DB-CURSOR-PUT_0020EXT-CURSOR_0020T_0020T_0029"
>Method (DB-CURSOR-PUT EXT-CURSOR T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003ABUILD-CURSOR-PUT-FUNCTION.html" name="function_005FBDB_003A_003ABUILD-CURSOR-PUT-FUNCTION"
......
......@@ -33,6 +33,23 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028INIT-ENVIRONMENT_0020_0028EQL_0020_0027DB-ENV_0029_0020T_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028INIT-ENVIRONMENT_0020_0028EQL_0020_0027DB-ENV_0029_0020T_0020T_0020T_0029"
>Method (INIT-ENVIRONMENT (EQL 'DB-ENV) T T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028INIT-ENVIRONMENT_0020_0028EQL_0020_0027DB-EXT-ENV_0029_0020T_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028INIT-ENVIRONMENT_0020_0028EQL_0020_0027DB-EXT-ENV_0029_0020T_0020T_0020T_0029"
>Method (INIT-ENVIRONMENT (EQL 'DB-EXT-ENV) T T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-ENV-CLOSE_0020DB-ENV_0029.html" name="method_005FBDB_003A_003A_0028DB-ENV-CLOSE_0020DB-ENV_0029"
......
......@@ -37,6 +37,30 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020_0028EQL_0020NIL_0029_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020_0028EQL_0020NIL_0029_0020T_0020T_0029"
>Method (INITIALIZE-DB-INSTANCE (EQL NIL) T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020DB-ENV_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020DB-ENV_0020T_0020T_0029"
>Method (INITIALIZE-DB-INSTANCE DB-ENV T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020DB-EXT-ENV_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028INITIALIZE-DB-INSTANCE_0020DB-EXT-ENV_0020T_0020T_0029"
>Method (INITIALIZE-DB-INSTANCE DB-EXT-ENV T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003AADJUST-SECONDARY-FLAGS.html" name="function_005FBDB_003A_003AADJUST-SECONDARY-FLAGS"
......@@ -143,6 +167,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-PUT_0020DB-EXT_0020T_0020T_0029.html" name="method_005FBDB_003A_003A_0028DB-PUT_0020DB-EXT_0020T_0020T_0029"
>Method (DB-PUT DB-EXT T T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003APUT-INTO-SECONDARY.html" name="function_005FBDB_003A_003APUT-INTO-SECONDARY"
......@@ -159,6 +191,14 @@
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003AEXT-UPDATE-SECONDARY.html" name="function_005FBDB_003A_003AEXT-UPDATE-SECONDARY"
>Function EXT-UPDATE-SECONDARY</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003ABUILD-PUT-FUNCTION.html" name="function_005FBDB_003A_003ABUILD-PUT-FUNCTION"
......@@ -192,6 +232,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-GET_0020DB-EXT_0020T_0029.html" name="method_005FBDB_003A_003A_0028DB-GET_0020DB-EXT_0020T_0029"
>Method (DB-GET DB-EXT T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003ABUILD-GET-FUNCTION.html" name="function_005FBDB_003A_003ABUILD-GET-FUNCTION"
......@@ -233,6 +281,14 @@
></div
>
<div class="computational-element-link computational-element-link-method"
><p
><a href="api/method_005FBDB_003A_003A_0028DB-DEL_0020DB-EXT_0020T_0029.html" name="method_005FBDB_003A_003A_0028DB-DEL_0020DB-EXT_0020T_0029"
>Method (DB-DEL DB-EXT T)</a
> </p
></div
>
<div class="computational-element-link computational-element-link-function"
><p
><a href="api/function_005FBDB_003A_003ABUILD-DEL-FUNCTION.html" name="function_005FBDB_003A_003ABUILD-DEL-FUNCTION"
......
......@@ -22,7 +22,9 @@
recover recover-fatal
use-environ
use-environ-root
create lockdown private)
create lockdown private
buf-reader buf-writer
)
(let ((env (bdb-env-create :rpc-client rpc-client)))
(%db-env-open env db-home mode
:init-cdb init-cdb :init-txn init-txn
......@@ -31,7 +33,11 @@
:recover recover :recover-fatal recover-fatal
:use-environ use-environ :use-environ-root use-environ-root
:create create :lockdown lockdown :private private)
(make-instance 'db-env :handle env)))</pre
(init-environment (if (and (functionp buf-reader )
(functionp buf-writer))
'db-ext-env
'db-env)
env buf-reader buf-writer)))</pre
><a href="../Database_0020Environments.html#function_005FBDB_003A_003ADB-ENV-OPEN"
>Source Context</a
></div
......
......@@ -61,10 +61,7 @@
:read-only read-only
:threaded threaded
:truncate truncate)
(make-instance (if (txn-support-for-handle dbp)
'db-txn
'db-std)
:handle dbp)))</pre
(initialize-db-instance env dbp txn)))</pre
><a href="../Databases.html#function_005FBDB_003A_003ADB-OPEN"
>Source Context</a
></div
......
<html
><head
><title
>Function EXT-UPDATE-SECONDARY</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Function: EXT-UPDATE-SECONDARY</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defun ext-update-secondary (db-and-callback key data key-buffer txn)
(multiple-value-call
(lambda (use ret)
(multiple-value-call (lambda (use buf) (put-into-secondary
(car db-and-callback)
use buf key-buffer txn))
(make-return-buffer (buf-writer (car db-and-callback))
use ret)))
(funcall (cdr db-and-callback) (car db-and-callback) key data)))</pre
><a href="../Databases.html#function_005FBDB_003A_003AEXT-UPDATE-SECONDARY"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file
......@@ -17,7 +17,7 @@
>(defun put-into-secondary (db use key data txn)
(unwind-protect
(when use
(db-put db key data :txn txn))
(db-put (db-handle db) key data :txn txn))
(when key
(free-cbuffer key))))</pre
><a href="../Databases.html#function_005FBDB_003A_003APUT-INTO-SECONDARY"
......
<html
><head
><title
>Method (DB-CURSOR-GET EXT-CURSOR)</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Method: (DB-CURSOR-GET EXT-CURSOR)</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defmethod db-cursor-get ((cursor ext-cursor) &amp;key key data
;;flags
current first get-both get-both-range
get-recno join-item last
next next-dup next-no-dup
prev prev-no-dup set set-range set-recno
multiple multiple-key rmw not-found)
(let ((key-buffer (when key (alloc-cbuffer)))
(data-buffer (when data (alloc-cbuffer))))
(unwind-protect
(multiple-value-bind (ret-key ret-data)
(call-next-method cursor
:key (when key
(funcall (buf-writer cursor)
key key-buffer)
key-buffer)
:data (when data
(funcall (buf-writer cursor)
data data-buffer)
data-buffer)
:current current :first first
:get-both get-both
:get-both-range get-both-range
:get-recno get-recno :join-item join-item
:last last :next next :next-dup next-dup
:next-no-dup next-no-dup :prev prev
:prev-no-dup prev-no-dup :set set
:set-range set-range :set-recno set-recno
:multiple multiple
:multiple-key multiple-key
:rmw rmw :not-found not-found)
(unwind-protect
(values (funcall (buf-reader cursor) ret-key)
(funcall (buf-reader cursor) ret-data))
(progn
(free-cbuffer ret-key)
(free-cbuffer ret-data))))
(progn
(when data-buffer (free-cbuffer data-buffer))
(when key-buffer (free-cbuffer key-buffer))))))</pre
><a href="../Cursors.html#method_005FBDB_003A_003A_0028DB-CURSOR-GET_0020EXT-CURSOR_0029"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file
<html
><head
><title
>Method (DB-CURSOR-PUT EXT-CURSOR T T)</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Method: (DB-CURSOR-PUT EXT-CURSOR T T)</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defmethod db-cursor-put ((cursor ext-cursor) key data &amp;key
after before current
key-first key-last no-dup-data)
(with-cbuffer key-buf
(with-cbuffer data-buf
(funcall (buf-writer cursor) key key-buf)
(funcall (buf-writer cursor) data data-buf)
(call-next-method cursor key data
:after after
:before before
:current current
:key-first key-first
:key-last key-last
:no-dup-data no-dup-data))))</pre
><a href="../Cursors.html#method_005FBDB_003A_003A_0028DB-CURSOR-PUT_0020EXT-CURSOR_0020T_0020T_0029"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file
<html
><head
><title
>Method (DB-CURSOR DB-EXT)</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Method: (DB-CURSOR DB-EXT)</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defmethod db-cursor ((db db-ext) &amp;key txn write)
(make-instance 'ext-cursor
:handle (%db-cursor (if (is-secondary db)
(db-sec-handle db)
(db-handle db))
txn
:write write)
:env (db-get-env db)))</pre
><a href="../Cursors.html#method_005FBDB_003A_003A_0028DB-CURSOR_0020DB-EXT_0029"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file
<html
><head
><title
>Method (DB-DEL DB-EXT T)</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Method: (DB-DEL DB-EXT T)</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defmethod db-del ((db db-ext) key &amp;key txn)
(with-cbuffer key-buffer
(funcall (buf-writer db) key key-buffer)
(call-next-method db key-buffer :txn txn)))</pre
><a href="../Databases.html#method_005FBDB_003A_003A_0028DB-DEL_0020DB-EXT_0020T_0029"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file
<html
><head
><title
>Method (DB-GET DB-EXT T)</title
><link href="../style.css" rel="stylesheet"
/><link title="Print" href="../print.css" rel="alternate stylesheet"
/></head
><body
><div class="qbook"
><div class="computational-element"
><h1
>Method: (DB-GET DB-EXT T)</h1
><div class="contents"
><h2
>Source</h2
><pre class="code"
>(defmethod db-get ((db db-ext) key &amp;key data txn
consume consume-wait
set-recno
multiple rmw
not-found)
(with-cbuffer key-buffer
(funcall (buf-writer db) key key-buffer)
(let ((data-buffer (when data (alloc-cbuffer))))
(unwind-protect
(let* ((buf (db-get (if (is-secondary db)
(db-sec-handle db)
(db-handle db))
key-buffer
:data (when data
(funcall (buf-writer db)
data
data-buffer)
data-buffer)
:txn txn
:consume consume :consume-wait consume-wait
:set-recno set-recno
:multiple multiple :rmw rmw
:not-found not-found))
(ret))
(unwind-protect
(setf ret (funcall (buf-reader db) buf))
(free-cbuffer buf))
ret)
(when data-buffer
(free-cbuffer data-buffer))))))</pre
><a href="../Databases.html#method_005FBDB_003A_003A_0028DB-GET_0020DB-EXT_0020T_0029"
>Source Context</a
></div
></div
></div
></body
></html
>
\ No newline at end of file