This file contains 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
class Unset(object): | |
pass | |
class Item(object): | |
_cnt = 0 | |
def __init__(self, value=Unset, choice=Unset): | |
self.key = None | |
self.value = value | |
self.choice = choice |
This file contains 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
BEGIN | |
INSERT | |
ROLLBACK | |
BEGIN | |
INSERT | |
COMMIT | |
BEGIN | |
INSERT | |
COMMIT | |
BEGIN |
This file contains 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
// contract example | |
this.addItems([ | |
res('', { // resource at root of this contract (will be connected to some url at upper level) | |
get: [ // HTTP GET handler | |
// This array will be replaced with a handler containing number of other handlers | |
auth().opt, // optional authentication | |
data({ // input data specification | |
roomId: vld.Message.roomId, // Message class is defined below | |
fromDate: opt(dateStr), // date, allowed in string form, optional |