r9227: 4 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
[clsql.git] / base / loop-extension.lisp
index f8129b53cf527d5438ccf20bdb4e1245a38d8bd9..a78086baf5adce1e12476b1959512ad61284251f 100644 (file)
@@ -2,22 +2,16 @@
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
-;;;; Name:          loop-extension.lisp
-;;;; Purpose:       Extensions to the Loop macro for CMUCL
-;;;; Programmer:    Pierre R. Mai
+;;;; Name: loop-extension.lisp
+;;;; Purpose: Extensions to the Loop macro for CLSQL
 ;;;;
-;;;; Copyright (c) 1999-2001 Pierre R. Mai
+;;;; Copyright (c) 2001-2004 Kevin Rosenberg and (c) 1999-2001 Pierre R. Mai
 ;;;;
 ;;;; $Id$
-;;;;
-;;;; The functions in this file were orignally distributed in the
-;;;; MaiSQL package in the file sql/sql.cl
 ;;;; *************************************************************************
 
 (in-package #:cl-user)
 
-;;;; MIT-LOOP extension
-
 #+(or allegro sbcl)
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defpackage #:ansi-loop 
     (unless from-phrase
       (setq from-phrase '(clsql-base:*default-database*)))
     (cond
+      ;; Object query resulting in a list of returned object instances
+      ((consp in-phrase)
+       (error "object query not yet supported"))
+      
       ((consp variable)
        (let ((query-var (ansi-loop::loop-gentemp 'loop-record-))
             (db-var (ansi-loop::loop-gentemp 'loop-record-database-))
       (error "Missing OF or IN iteration path."))
     (unless from-phrase
       (setq from-phrase '(clsql-base:*default-database*)))
+
     (cond
+      ;; Object query resulting in a list of returned object instances
+      ((consp in-phrase)
+       (error "Object query not yet supported."))
+      
       ((consp iter-var)
        (let ((query-var (gensym "LOOP-RECORD-"))
             (db-var (gensym "LOOP-RECORD-DATABASE-"))