/* * Created on Thu Aug 27 2020 * * This file is a part of TerrabaseDB * Copyright (c) 2020, Sayan Nandan * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * */ /* * This file is used by TerrabaseDB's documentation website for automatically * generating documentation for the actions. It will also be used by the TerrabaseDB * server in the future */ [ { "name": "GET", "since": "0.1.0", "complexity": "O(1)", "args": "GET ", "desc": "Get the value of a key", "return": "Value if it exists or (Code: 1) if it does not" }, { "name": "MGET", "since": "0.4.0", "complexity": "O(n)", "args": "MGET ...", "desc": "Get the value of 'n' keys", "return": "Value if it exists or (Code: 1) if it does not" }, { "name": "SET", "since": "0.1.0", "complexity": "O(1)", "args": "SET ", "desc": "Set the value of a key", "return": "(Code: 0) if succeeded or (Code: 2) if not" }, { "name": "MSET", "since": "0.4.0", "complexity": "O(n)", "args": "MSET ...", "desc": "Set the value of 'n' keys", "return": "Number of keys that were set as an unsigned int" }, { "name": "UPDATE", "since": "0.1.0", "complexity": "O(1)", "args": "UPDATE ", "desc": "Update the value of an existing key", "return": "(Code: 0) if succeeded or (Code: 1) if not" }, { "name": "MUPDATE", "since": "0.4.0", "complexity": "O(n)", "args": "UPDATE ...", "desc": "Update the value of 'n' keys", "return": "Number of keys that were updated as an unsigned int" }, { "name": "DEL", "since": "0.1.0", "complexity": "O(n)", "args": "DEL ...", "desc": "Delete 'n' keys", "return": "Number of keys that were deleted as an unsigned int" }, { "name": "EXISTS", "since": "0.4.0", "complexity": "O(n)", "args": "EXISTS ...", "desc": "Check if 'n' keys exist", "return": "Number of keys that exist as an unsigned int" }, { "name": "SSET", "since": "0.4.3", "complexity": "O(n)", "args": "SSET ...", "desc": "Set all keys to the given values only if all of them don't exist", "return": "(Code: 0) if all keys were set, otherwise (Code: 2)" }, { "name": "SDEL", "since": "0.4.3", "complexity": "O(n)", "args": "SDEL ...", "desc": "Delete all keys if all of the keys exist", "return": "(Code: 0) if all keys were deleted, otherwise (Code: 1)" }, { "name": "SUPDATE", "since": "0.4.3", "complexity": "O(n)", "args": "SUPDATE ...", "desc": "Update all keys if all of the keys exist", "return": "(Code: 0) if all keys were updated, otherwise (Code: 1)" }, { "name": "DBSIZE", "since": "0.4.3", "complexity": "O(1)", "args": "DBSIZE", "desc": "Number of key/value pairs stored in the database", "return": "Number of keys that exist in the database as an unsigned int" }, { "name": "FLUSHDB", "since": "0.4.3", "complexity": "O(n)", "args": "FLUSHDB", "desc": "Removes all the key/value pairs stored in the database", "return": "(Code: 0) if the operation succeeded" }, { "name": "USET", "since": "0.4.4", "complexity": "O(n)", "args": "USET ...", "desc": "SET all keys if they don't exist, or UPDATE them if they do exist", "return": "Number of keys that were `USET`ed, as an unsigned int" }, { "name": "KEYLEN", "since": "0.4.4", "complexity": "O(1)", "args": "KEYLEN ", "desc": "Returns the length of the UTF-8 string", "return": "Length of the key as an unsigned int", } ]