Skip to content

Commit

Permalink
Merge pull request #138 from fukamachi/add-conc-name-accessors-only-u…
Browse files Browse the repository at this point in the history
…nspecified

Add auto-generated accessors with :conc-name only when :reader and :writer are not specified
  • Loading branch information
fukamachi authored May 24, 2024
2 parents 8da8c80 + 72ec630 commit aa8e679
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/dao/column.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
(let ((accessor (intern
(format nil "~:@(~A~A~)" *conc-name* name)
*package*)))
(pushnew accessor readers)
(pushnew `(setf ,accessor) writers)
(setf (getf rest-initargs :readers) readers)
(setf (getf rest-initargs :writers) writers)))
(unless readers
(pushnew accessor readers)
(setf (getf rest-initargs :readers) readers))
(unless writers
(pushnew `(setf ,accessor) writers)
(setf (getf rest-initargs :writers) writers))))

(when inflate
(setf (getf rest-initargs :inflate) (eval inflate)))
Expand Down

0 comments on commit aa8e679

Please sign in to comment.