Created
May 20, 2014 17:19
-
-
Save blambeau/366bd21ff9704c33b9b1 to your computer and use it in GitHub Desktop.
Finitio dress/undress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S = Finitio.parse <<-EOF | |
Uuid = String( ... ) | |
Time = .Date <iso> String( s | ... ) .Finitio.Contract.Time.iso | |
Physical = { | |
uuid: String | |
title: String | |
at: String | |
} | |
Logical = { | |
uuid: Uuid | |
title: Title | |
at: Time | |
} | |
EOF | |
# from the database to the js (parse) | |
logical = S['Logical'].dress({at: "2015-04-19T16:00"}) | |
# from the logical side to the database (dump) | |
physical = S['logical'].undress(logical, S['Physical']) | |
at: Time -> String | |
iso: String( s | ... ) | |
String( s | ...) -> String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment