※ http-test-get-instance-by-oidを利用するには、id属性にslot idを指定したタグでslotの値を囲む必要があります。slot idはslot-idにて取得可能です。
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :web4r))
(in-package :cl-user)
(defpackage :wiki (:use :cl :web4r))
(in-package :wiki)
(ele:open-store *example-bdb*)
(defpclass wiki ()
((title :length 256 :index t)
(body :length 3000)))
(genpages wiki)
(start-server)
(let ((class 'wiki))
(with-new-cookie
(let ((oid (http-test-make-instance class :title "title1" :body "body1")))
(http-test-get-instance-by-oid class oid)
(http-test-update-instance class oid '((title . "title1c") (body . "body1c")))
(http-test-drop-instance-by-oid class oid))))
(let ((class 'blog)
(id "user1")
(pass "pass1"))
(with-new-cookie
(http-test-regist `((id . ,id)
(pass . ,pass)
(email . "1@1.com")
(blog-title . "user1's blog")))
(http-test-login :id id :pass pass)
(let ((oid (http-test-make-instance class :title "title1" :body "body1")))
(http-test-get-instance-by-oid class oid)
(http-test-update-instance class oid '((title . "title1c") (body . "body1c")))
(http-test-drop-instance-by-oid class oid))
(http-test-logout)))
debug-mode-onはデバッグモードを開始し、debug-mode-offはデバッグモードを終了します。
デバッグモードはエラー発生時に次の2つのことを行います。