Re: default value for set in :db-info?

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Cyrus Harmon wrote:
> At the risk of opening a couple cans of worms, why does :immediate  
> imply :set nil? It would seem that the :immediate thing would be useful  

Well, the overly simple answer is that is why the CommonSQL spec
dictates. It's been a while since I wrote the code to support this,
but IIRC, I have a single SQL statement that loads both the object and
it's joined instance. I don't think it'd be particularly efficient to
have a single single statement that loads both the single object as
well multiple joined classes.
 
> in populating instances as it would obviate the need for a db round  
> trip. I assume that in :deferred mode, there's a separate round trip  
> for each instance? It would seem like it would be a big win to populate  
> the join slots for the instances when a query is generated on the  
> class, even if the value of the join slot is a set, not a single row.  
> Does this make sense or am I missing something about how all of this  
> works?

As for the :deferred mode, again, it's been a while since I wrote the
code -- I invite you to review the sources yourself for the definitive
answer. However, IIRC, only a single SQL statement is employed to get
the data for the joined set.

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.