Optionaldriver: DriversOptionaloptions: goodDBOptionsAdd a number to the value stored in a key.
The key of the value to add to.
The number to add.
Optionaloptions: methodOptionsThe options to use.
The new value or a promise that resolves to the new value.
Get all the data in the database.
Optionaltype: "object" | "array"The type of data to return ('object' or 'array').
All the data or a promise that resolves to all the data.
ReadonlycacheClear the database.
A boolean indicating the success of the operation or a promise that resolves to a boolean.
Delete a key and its associated value.
The key to delete.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating the success of the operation or a promise that resolves to a boolean.
Delete multiple keys at once.
An array of keys to delete.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating the success of the operation or a promise that resolves to a boolean.
Get distinct values from an array stored in a key.
The key of the array to get distinct values from.
Optionalvalue: (value: any, index: number, obj: any[]) => anyThe value or callback function to use for getting distinct values.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating whether any value was found or a promise that resolves to a boolean.
Double the value stored in a key.
The key of the value to double.
Optionaloptions: methodOptionsThe options to use.
The new value or a promise that resolves to the new value.
ReadonlydriverCheck if a key ends with a specific value.
The key to check.
Optionaloptions: methodOptionsThe options to use.
The value or a promise that resolves to the value.
Filter values in an array stored in a key.
The key of the array to filter.
The callback filter function to use.
Optionaloptions: methodOptionsThe options to use.
An array of filtered values or a promise that resolves to an array.
Find values in an array stored in a key that satisfy a callback function.
The key of the array to find values in.
The callback function to use for finding values.
Optionaloptions: methodOptionsThe options to use.
The value or a promise that resolves to the value.
Find a value in an array and update it.
The key of the array to search.
The callback function to find the element.
The callback function to update the found element.
Optionaloptions: methodOptionsThe options to use.
The updated element or undefined if not found, or a promise that resolves to the result.
Find multiple values in an array and update them.
The key of the array to search.
The callback function to find the elements.
The callback function to update the found elements.
Optionaloptions: methodOptionsThe options to use.
An array of updated elements or a promise that resolves to an array of updated elements.
Get the value associated with a key.
The key to get the value from.
Optionaloptions: methodOptionsThe options to use.
The value associated with the key or a promise that resolves to the value.
Get multiple values by their keys at once.
An array of keys to get.
Optionaloptions: methodOptionsThe options to use.
An object with key-value pairs or a promise that resolves to an object with key-value pairs.
Check if a key exists.
The key to check.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating whether the key exists or a promise that resolves to a boolean.
Check if a key includes a specific value.
The key to check.
Optionaloptions: methodOptionsThe options to use.
The value or a promise that resolves to the value.
ReadonlyisGet all the keys in the database.
An array of keys or a promise that resolves to an array of keys.
Perform a mathematical operation on the value stored in a key.
The key of the value to perform the operation on.
The mathematical sign to use for the operation.
The number to use for the operation.
Optionaloptions: methodOptionsThe options to use.
The new value or a promise that resolves to the new value.
Multiply the value stored in a key by a number.
The key of the value to multiply.
The number to multiply by.
Optionaloptions: methodOptionsThe options to use.
The new value or a promise that resolves to the new value.
ReadonlynestedOptional ReadonlyoptionsRemove and return the last element of an array stored in a key.
The key of the array to pop the value from.
Optionaloptions: methodOptionsThe options to use.
The popped value or a promise that resolves to the popped value.
Remove one or all occurrences of a value from an array stored in a key.
The key of the array to pull the value from.
The value or callback function to use to pull the value.
OptionalpullAll: booleanWhether to pull all occurrences or just the first one.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating whether any value was pulled or a promise that resolves to a boolean.
Push a value to an array stored in a key.
The key of the array to push the value to.
The value to push.
Optionaloptions: methodOptionsThe options to use.
The new length of the array or a promise that resolves to the new length.
Set a value to a key.
The key to set the value to.
The value to set.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating the success of the operation or a promise that resolves to a boolean.
Set multiple key-value pairs at once.
An object with key-value pairs to set.
Optionaloptions: methodOptionsThe options to use.
A boolean indicating the success of the operation or a promise that resolves to a boolean.
Remove and return the first element of an array stored in a key.
The key of the array to shift the value from.
Optionaloptions: methodOptionsThe options to use.
The shifted value or a promise that resolves to the shifted value.
Get the size of the value stored in a key.
The key of the value to get the size of.
Optionaloptions: methodOptionsThe options to use.
The size of the value or a promise that resolves to the size.
Check if a key starts with a specific value.
The key to check.
Optionaloptions: methodOptionsThe options to use.
The value or a promise that resolves to the value.
Subtract a number from the value stored in a key.
The key of the value to subtract from.
The number to subtract.
Optionaloptions: methodOptionsThe options to use.
The new value or a promise that resolves to the new value.
Get a table from the database.
ReadonlytableGet the type of the value stored in a key.
The key of the value to get the type of.
Optionaloptions: methodOptionsThe options to use.
The type of the value or a promise that resolves to the type.
Add a value to the beginning of an array stored in a key.
The key of the array to unshift the value to.
The value to unshift.
Optionaloptions: methodOptionsThe options to use.
The new length of the array or a promise that resolves to the new length.
Get all the values in the database.
An array of values or a promise that resolves to an array of values.
Connect to the database.
A promise that resolves to a boolean indicating the success of the connection.
Disconnect from the database.
A promise that resolves to a boolean indicating the success of the disconnection.
The main class for the GoodDB package
Example: Using JSONDriver (sync)
Example: Using MongoDBDriver (async)