Simplify the exists command
This commit is contained in:
parent
fdce2ed81c
commit
977627a8af
1 changed files with 3 additions and 8 deletions
|
@ -170,14 +170,9 @@ omitted or any number of tag names."
|
||||||
|
|
||||||
Check if URL exists in the database. Prints `yes' when found and `no'
|
Check if URL exists in the database. Prints `yes' when found and `no'
|
||||||
otherwise."
|
otherwise."
|
||||||
(if (execute-single *db* "SELECT rowid FROM bookmark WHERE url = ?"
|
(format t "~:[no~;yes~]~%"
|
||||||
(car args))
|
(execute-single
|
||||||
(progn
|
*db* "SELECT rowid FROM bookmark WHERE url = ?" (car args))))
|
||||||
(format t "yes~%")
|
|
||||||
0)
|
|
||||||
(progn
|
|
||||||
(format t "no~%")
|
|
||||||
1)))
|
|
||||||
|
|
||||||
(defcommand help
|
(defcommand help
|
||||||
"Show help message."
|
"Show help message."
|
||||||
|
|
Loading…
Reference in a new issue