Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
submarine
submarine
Commits
957330ac
Commit
957330ac
authored
Aug 22, 2007
by
ryszard.szopa
Browse files
Submarine signals an error when you try to create a DAO providing a non-existant ID.
darcs-hash:d1e454e619823d1be6947ca75b098c323e6ead38
parent
7a456cae
Changes
2
Hide whitespace changes
Inline
Side-by-side
dao.lisp
View file @
957330ac
...
...
@@ -80,6 +80,11 @@ any)."
(
:select
'*
:from
(
class-name-of
dao
)
:where
(
:=
'id
(
get-id
dao
)))
:alist
)))
(
unless
query-result
(
error
(
make-condition
'sql-id-does-not-exist
:format-control
"You tried to create a DAO with a non-existant ID."
:id
(
get-id
dao
)
:table
(
class-name-of
dao
))))
(
iter
(
for
slot
in
(
non-transient-slots-of
dao
))
...
...
db.lisp
View file @
957330ac
...
...
@@ -99,6 +99,11 @@ right name in the table, but its type is wrong"))
(
type
:initarg
:type
:reader
column-type
))
(
:documentation
"Condition signaling a missing column in an existing table."
))
(
define-condition
sql-id-does-not-exist
(
sql-error
)
((
id
:initarg
:id
:reader
id
))
(
:documentation
"Condition signaling the attempt to initialize a dao
with a non-existant ID."
))
(
defgeneric
database-consistent-with-specification
(
class
)
(
:documentation
"Return nothing if TABLE in the connected-p database
meets its specification. Otherwise, throw an appropriate error. There
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment