adamc@325: table t1 : {Id : int, A : int, B : string, C : float, D : bool}
adamc@325:
adamc@325: open Crud.Make(struct
adamc@339: con cols :: {(Type * Type)} = [
adamc@339: A = (int, string),
adamc@339: B = (string, string),
adamc@339: C = (float, string),
adamc@339: D = (bool, string)
adamc@339: ]
adamc@339:
adamc@325: val tab = t1
adamc@325:
adamc@325: val title = "Crud1"
adamc@325:
adamc@325: val cols = {
adamc@339: A = {
adamc@339: Nam = "A",
adamc@339: Show = txt _,
adamc@339: Widget = fn nm :: Name => ,
adamc@339: Parse = readError _,
adamc@339: Inject = sql_int
adamc@339: },
adamc@339: B = {
adamc@339: Nam = "B",
adamc@339: Show = txt _,
adamc@339: Widget = fn nm :: Name => ,
adamc@339: Parse = readError _,
adamc@339: Inject = sql_string
adamc@339: },
adamc@339: C = {
adamc@339: Nam = "C",
adamc@339: Show = txt _,
adamc@339: Widget = fn nm :: Name => ,
adamc@339: Parse = readError _,
adamc@339: Inject = sql_float
adamc@339: },
adamc@339: D = {
adamc@339: Nam = "D",
adamc@339: Show = txt _,
adamc@339: Widget = fn nm :: Name => ,
adamc@339: Parse = readError _,
adamc@339: Inject = sql_bool
adamc@339: }
adamc@325: }
adamc@325: end)