comparison src/cjr_print.sml @ 742:43553c93dd8c

Reading blobs from the database
author Adam Chlipala <adamc@hcoop.net>
date Sun, 26 Apr 2009 10:45:59 -0400
parents f7e2026dd5ae
children cd67c3a942e3
comparison
equal deleted inserted replaced
741:f7e2026dd5ae 742:43553c93dd8c
432 newline, 432 newline,
433 string "tmp;", 433 string "tmp;",
434 newline, 434 newline,
435 string "})"], 435 string "})"],
436 string ")"] 436 string ")"]
437
438 | TFfi ("Basis", "blob") => box [string "uw_Basis_stringToBlob_error(ctx, PQgetvalue(res, i, ",
439 string (Int.toString i),
440 string "), PQgetlength(res, i, ",
441 string (Int.toString i),
442 string "))"]
437 443
438 | _ => 444 | _ =>
439 p_unsql wontLeakStrings env tAll 445 p_unsql wontLeakStrings env tAll
440 (box [string "PQgetvalue(res, i, ", 446 (box [string "PQgetvalue(res, i, ",
441 string (Int.toString i), 447 string (Int.toString i),
545 List.all (fn (_, _, to) => case to of 551 List.all (fn (_, _, to) => case to of
546 NONE => true 552 NONE => true
547 | SOME t => nl ok' t) cons 553 | SOME t => nl ok' t) cons
548 end) 554 end)
549 | TFfi ("Basis", "string") => false 555 | TFfi ("Basis", "string") => false
550 | TFfi ("Basis", "blob") => false 556 | TFfi ("Basis", "blob") => allowHeapAllocated
551 | TFfi _ => true 557 | TFfi _ => true
552 | TOption t => allowHeapAllocated andalso nl ok t 558 | TOption t => allowHeapAllocated andalso nl ok t
553 in 559 in
554 nl IS.empty 560 nl IS.empty
555 end 561 end