comparison src/postgres.sml @ 880:8e9f2d247dba

Testing nested queries
author Adam Chlipala <adamc@hcoop.net>
date Fri, 17 Jul 2009 12:25:34 -0400
parents b2a175a0f2ef
children 9c1b7e46eed2
comparison
equal deleted inserted replaced
879:b2a175a0f2ef 880:8e9f2d247dba
492 newline, 492 newline,
493 string "uw_db_prepare(ctx);", 493 string "uw_db_prepare(ctx);",
494 newline, 494 newline,
495 string "}"] 495 string "}"]
496 496
497 fun p_getcol {wontLeakStrings, col = i, typ = t} = 497 fun p_getcol {loc, wontLeakStrings, col = i, typ = t} =
498 let 498 let
499 fun p_unsql t e eLen = 499 fun p_unsql t e eLen =
500 case t of 500 case t of
501 Int => box [string "uw_Basis_stringToInt_error(ctx, ", e, string ")"] 501 Int => box [string "uw_Basis_stringToInt_error(ctx, ", e, string ")"]
502 | Float => box [string "uw_Basis_stringToFloat_error(ctx, ", e, string ")"] 502 | Float => box [string "uw_Basis_stringToFloat_error(ctx, ", e, string ")"]
548 box [string "({", 548 box [string "({",
549 string (p_sql_ctype t), 549 string (p_sql_ctype t),
550 space, 550 space,
551 string "tmp;", 551 string "tmp;",
552 newline, 552 newline,
553 string "uw_error(ctx, FATAL, \"Unexpectedly NULL field #", 553 string "uw_error(ctx, FATAL, \"",
554 string (ErrorMsg.spanToString loc),
555 string ": Unexpectedly NULL field #",
554 string (Int.toString i), 556 string (Int.toString i),
555 string "\");", 557 string "\");",
556 newline, 558 newline,
557 string "tmp;", 559 string "tmp;",
558 newline, 560 newline,