Branch: Tag:

2008-06-30

2008-06-30 12:10:32 by Stephen R. van den Berg <srb@cuci.nl>

Multisets produce one element unquoted

Rev: lib/modules/Sql.pmod/sql_util.pmod:1.24

1:   /* -  * $Id: sql_util.pmod,v 1.23 2008/06/30 12:09:15 srb Exp $ +  * $Id: sql_util.pmod,v 1.24 2008/06/30 12:10:32 srb Exp $    *    * Some SQL utility functions.    * They are kept here to avoid circular references.
51:    lambda(mixed m) {    if(zero_type(m))    return "NULL"; -  if(multisetp(m)) m = indices(m)[0]; +  if(multisetp(m)) +  return sizeof(m) ? indices(m)[0] : "";    return "'"+(intp(m)?(string)m:my_quote((string)m))+"'";    });    // Throws if mapping key is empty string.