HCoop
/
hcoop
/
smlsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add proper handling of null column values
[hcoop/smlsql.git]
/
libpq
/
pg.sml
diff --git
a/libpq/pg.sml
b/libpq/pg.sml
index
de1a9e8
..
1b99da2
100644
(file)
--- a/
libpq/pg.sml
+++ b/
libpq/pg.sml
@@
-104,7
+104,11
@@
struct
let
fun build (~1, acc) = acc
| build (j, acc) =
let
fun build (~1, acc) = acc
| build (j, acc) =
- build (j-1, makeValue (F_PQgetvalue.f' (roRes, i, j)) :: acc)
+ build (j-1,
+ if F_PQgetisnull.f' (roRes, i, j) <> 0 then
+ NONE :: acc
+ else
+ makeValue (F_PQgetvalue.f' (roRes, i, j)) :: acc)
in
builder (i+1, f (build (nf-1, []), acc))
end
in
builder (i+1, f (build (nf-1, []), acc))
end