Re: update-record-from-instance question/gripe

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Cyrus Harmon wrote:
> Excuse my ignorance of the terminology, but what exactly do you mean 
> when you say CommonSQL? Are you saying that the predecessor to clsql 
> doesn't support such functionality but that clsql does? Or that clsql 
> doesn't support such functionality? The workaround sounds reasonable, 
> but modifying the behavior of update-record-from-instance also sounds 
> reasonable.

The CommonSQL API as published and implemented by Lispworks. This is
the API which CLSQL strives to maintain backward compatibility. CLSQL
does maintain some extensions to the CommonSQL API which do not break
backward compatibility.

As for the behavior of update-records-from-instance, yes, it could be
extended. Perhaps a better solution would be to add a function to
explicity change the view-database of an object. Of course, that's
rather trivial [untested]:
  (defun (setf db-object-database) (db obj)
     (setf (slot-value obj 'clsql-sys::view-database) db))

However, I've not thought through whether there are any potential
issues with changing the view-database slot of a db-object which
already has a non-null value of in the view-database slot.

Kevin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.