Branch: Tag:

2008-06-25

2008-06-25 11:53:32 by Stephen R. van den Berg <srb@cuci.nl>

Sql: Use undefineds instead of 0 integers in case of NULL elements

Rev: lib/modules/Sql.pmod/sql_util.pmod:1.20
Rev: src/modules/Msql/msqlmod.c:1.30
Rev: src/modules/Mysql/result.c:1.39
Rev: src/modules/Odbc/odbc_result.c:1.58
Rev: src/modules/Oracle/oracle.c:1.93
Rev: src/modules/Postgres/pgresult.c:1.35

1:   /* -  * $Id: sql_util.pmod,v 1.19 2007/05/03 13:57:35 mast Exp $ +  * $Id: sql_util.pmod,v 1.20 2008/06/25 11:53:31 srb Exp $    *    * Some SQL utility functions.    * They are kept here to avoid circular references.
50:    v=map(values(bindings),    lambda(mixed m) {    if(multisetp(m)) m = indices(m)[0]; -  return (stringp(m)? "'"+my_quote(m)+"'" : (string)m); +  return (stringp(m)? "'"+my_quote(m)+"'" : +  zero_type(m)?"NULL":(string)m);    });    // Throws if mapping key is empty string.    k=map(indices(bindings),lambda(string s){