Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

table#fetch returns only one instance if :first or number is specifie…

…d as the second argument.
  • Loading branch information...
commit e3185aa1f7332f7c579233a144e8fd91366352f6 1 parent dac346f
@fukamachi authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/table.lisp
14 src/table.lisp
@@ -27,15 +27,15 @@
(defun fetch (table ids-or-key &key where order offset limit group-by)
(etypecase ids-or-key
(keyword (ecase ids-or-key
- (:first (select table :limit 1 :offset offset :flatp t))
+ (:first (car (select table :limit 1 :offset offset :flatp t)))
(:all (select table :flatp t))))
- (select table
- :where
- (if where
- [and [= [id] ids-or-key] where]
- [= [id] ids-or-key])
- :flatp t))
+ (car (select table
+ :where
+ (if where
+ [and [= [id] ids-or-key] where]
+ [= [id] ids-or-key])
+ :flatp t)))
(cons (select table
(if where
Please sign in to comment.
Something went wrong with that request. Please try again.