- (clsql:with-transaction ()
- ;; valid update
- (clsql:update-records [employee]
- :av-pairs '((email "lenin-nospam@soviet.org"))
- :where [= [emplid] 1])
- ;; invalid update which generates an error
- (clsql:update-records [employee]
- :av-pairs
- '((emale "lenin-nospam@soviet.org"))
- :where [= [emplid] 1]))
- (clsql:sql-database-error ()
- (progn
- ;; check status
- (push (clsql:in-transaction-p) results)
- ;; and check nothing done
- (push (clsql:select [email] :from [employee] :where [= [emplid] 1]
- :flatp t)
- results)
- (apply #'values (nreverse results))))))
+ (clsql:with-transaction ()
+ ;; valid update
+ (clsql:update-records [employee]
+ :av-pairs '((email "lenin-nospam@soviet.org"))
+ :where [= [emplid] 1])
+ ;; invalid update which generates an error
+ (clsql:update-records [employee]
+ :av-pairs
+ '((emale "lenin-nospam@soviet.org"))
+ :where [= [emplid] 1]))
+ (clsql:sql-database-error ()
+ (progn
+ ;; check status
+ (push (clsql:in-transaction-p) results)
+ ;; and check nothing done
+ (push (clsql:select [email] :from [employee] :where [= [emplid] 1]
+ :flatp t)
+ results)
+ (apply #'values (nreverse results))))))