ram64
Version:
Multi-threaded 64bit memory cache database inspired by redis-like features
152 lines (151 loc) • 2.89 kB
JavaScript
"use strict";
exports.commands = exports.commandsDict = void 0;
let commandIndex = 0;
const commandsDict = {
// private
'connect': {
index: commandIndex++,
private: true
},
'ping': {
index: commandIndex++
},
// public
// functions
'save': {
index: commandIndex++,
promise: true
},
'load': {
index: commandIndex++,
promise: true
},
'registerFunction': {
index: commandIndex++
},
// reads
'exists': {
index: commandIndex++
},
'get': {
index: commandIndex++
},
'getKeyCount': {
index: commandIndex++
},
'getSet': {
index: commandIndex++
},
'getWithOptions': {
index: commandIndex++
},
'scan': {
index: commandIndex++
},
// writes
'touch': {
index: commandIndex++
},
'set': {
index: commandIndex++
},
'setIfValue': {
index: commandIndex++
},
'setFn': {
index: commandIndex++
},
'setOptions': {
index: commandIndex++
},
'setWithOptions': {
index: commandIndex++
},
'insert': {
index: commandIndex++
},
// deletes
'del': {
index: commandIndex++
},
'deleteAll': {
index: commandIndex++
},
// strings
'strAppend': {
index: commandIndex++
},
'strPrepend': {
index: commandIndex++
},
'strLength': {
index: commandIndex++
},
'strSetRange': {
index: commandIndex++
},
'strGetRange': {
index: commandIndex++
},
'strReplace': {
index: commandIndex++
},
// numbers
'numAdd': {
index: commandIndex++
},
'numSub': {
index: commandIndex++
},
'numMult': {
index: commandIndex++
},
'numDiv': {
index: commandIndex++
},
// sets
'setGetMembers': {
index: commandIndex++
},
'setAddMembers': {
index: commandIndex++
},
'setRemoveMembers': {
index: commandIndex++
},
'setGetMemberCount': {
index: commandIndex++
},
'setHasMembers': {
index: commandIndex++
},
// maps
'mapGetKeys': {
index: commandIndex++
},
'mapGetValues': {
index: commandIndex++
},
'mapGetFields': {
index: commandIndex++
},
'mapAddFields': {
index: commandIndex++
},
'mapRemoveKeys': {
index: commandIndex++
},
'mapGetCount': {
index: commandIndex++
},
'mapHasKeys': {
index: commandIndex++
}
};
exports.commandsDict = commandsDict;
const commands = Object.entries(commandsDict).map(([name, command])=>({
name,
...command
}));
exports.commands = commands;
//# sourceMappingURL=commands.js.map