Re: Bug in sql/oodml.lisp

Russ Tyndall <[email protected]> Mon, 24 Feb 2014 14:04:34 -0500
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
Howdy CLSQL list,

The code referenced has changed in more recent versions of clsql (and is 
let instead of progv), but still doesnt bind the *print-length* 
variable.  I will commit a patch adding that binding *print-length*.

I am hesitant to set *print-base* as it would effectively prevent 
printing numbers in different base systems to the database. Probably not 
a big deal, but it would seem like something you might want if you 
already have your system set to interact in another base.

I hope to get this and a bunch of patches pushed up to b9 improving the 
state of various things and including patches from the mailing list of 
the the last little bit.  At that point I think we will be ready for 
another minor CLSQL release.  A quick summary of changes: more tests 
pass, sqlite3 works better, auto increment works better in more 
databases (sqlite3, mssql), bug fixes related to signed/unsigned ints 
(when using uffi), postgresql over odbc works more reliably.

Cheers,
Russ Tyndall
Developer
Acceleration.net


On 02/20/2014 11:14 AM, 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