view demo/more/versioned.urs @ 2162:c39c48696393

Allow returnBlob and redirect in static protocol Both of these functions end up returning RETURN_INDIRECTLY, which is assumed to be an error by static.c's main. Treat it as success instead.
author Julian Squires <julian@cipht.net>
date Mon, 13 Jul 2015 14:34:30 -0400
parents 166ea3944b91
children
line wrap: on
line source
functor Make(M : sig
                 con key :: {Type}
                 con data :: {Type}
                 constraint key ~ data
                 constraint [When, Version] ~ (key ++ data)

                 val key : $(map sql_injectable key)
                 val data : $(map (fn t => {Inj : sql_injectable_prim t,
                                            Eq : eq t}) data)

                 val keyFolder : folder key
                 val dataFolder : folder data
             end) : sig
    val insert : $(M.key ++ M.data) -> transaction unit
    val update : $(M.key ++ M.data) -> transaction unit

    val keys : transaction (list $M.key)
    val current : $M.key -> transaction (option $M.data)

    type version
    val keysAt : version -> transaction (list $M.key)
    val archive : version -> $M.key -> transaction (option $M.data)
    val updateTimes : transaction (list (version * time))
end