Re: Bug in sql/oodml.lisp
Peter Stirling <[email protected]> Thu, 20 Feb 2014 19:20:05 +0000
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, Am I being dense in wondering why that bit of code is using PROGV instead of LET? I thought PROGV was for situations where you don't know in advance which special-variables you want to bind? On 20/02/14 16:14, Nicolas Neuss wrote: > Hello, > > I got bitten by the following problem: When I have > *print-length* set to some number for preventing output of undesired > length elsewhere, lists longer than that number are not written > correctly to the database when using UPDATE-RECORDS-FROM-INSTANCE. > > The correct remedy for this special problem is probably to change the > PROGV special variable list in certain method definitions of > DATABASE-OUTPUT-SQL-AS-TYPE in the file "sql/oodml.lisp" to include also > setting *PRINT-LENGTH* to NIL, i.e. > > (defmethod database-output-sql-as-type ((type (eql 'list)) val database db-type) > (declare (ignore database db-type)) > (progv '(*print-circle* *print-array*) '(t t) > ...)) > > becomes > > (defmethod database-output-sql-as-type ((type (eql 'list)) val database db-type) > (declare (ignore database db-type)) > (progv '(*print-circle* *print-array* *print-length*) '(t t nil) > ...)) > > Note that the same change has to be performed for the specializations of > this generic function to vectors and arrays later in that file: > > (defmethod database-output-sql-as-type ((type (eql 'vector)) val ...) ...) > (defmethod database-output-sql-as-type ((type (eql 'array)) val ...) ...) > > Yours, > > Nicolas > > P.S.: What about *PRINT-BASE*? > _______________________________________________ > CLSQL mailing list > [email protected] > http://lists.b9.com/cgi-bin/mailman/listinfo/clsql