Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Add minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszstolarczuk committed Oct 4, 2019
1 parent f02420e commit bdb068b
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@

const pmemkv = require('bindings')('pmemkv');

/** @class Main Node.js pmemkv class, it provides functions to operate on data in database. */
/** @class Main Node.js pmemkv class, it provides functions to operate on data in database.
* If an error/exception is thrown from a method it will contain *status* variable.
* Possible statuses are enumerated in constants.status.
*/
class db {
/**
* Creates an instance of db.
Expand Down Expand Up @@ -81,7 +84,7 @@ class db {

/**
* Executes function for every record stored in db. Callback is called
* only with key of each record.
* only with the key of each record.
*
* @throws {Error} on any failure.
* @param {Function} callback - function to be called for every element stored in db.
Expand All @@ -92,8 +95,8 @@ class db {
}

/**
* Executes function for every record stored in db, whose keys are
* greater than *key*. Callback is called only with key of each record.
* Executes function for every record stored in db, whose keys are greater
* than the given *key*. Callback is called only with the key of each record.
*
* @throws {Error} on any failure.
* @param {string} key - sets the lower bound for querying.
Expand All @@ -105,8 +108,8 @@ class db {
}

/**
* Executes function for every record stored in db, whose keys are
* less than the *key*. Callback is called only with key of each record.
* Executes function for every record stored in db, whose keys are less than
* the given *key*. Callback is called only with the key of each record.
*
* @throws {Error} on any failure.
* @param {string} key - sets the upper bound for querying.
Expand All @@ -119,8 +122,8 @@ class db {

/**
* Executes function for every record stored in db, whose keys are
* greater than *key1* and less than *key2*. Callback is called
* only with key of each record.
* greater than the *key1* and less than the *key2*. Callback is
* called only with the key of each record.
*
* @throws {Error} on any failure.
* @param {string} key1 - sets the lower bound for querying.
Expand Down Expand Up @@ -171,7 +174,7 @@ class db {

/**
* Returns number of currently stored elements in db, whose keys are
* greater than *key1* and less than *key2*.
* greater than the *key1* and less than the *key2*.
*
* @throws {Error} on any failure.
* @param {string} key1 - sets the lower bound of counting.
Expand All @@ -195,7 +198,7 @@ class db {

/**
* Executes function for every record stored in db, whose keys are
* greater than *key*.
* greater than the given *key*.
*
* @throws {Error} on any failure.
* @param {string} key - sets the lower bound for querying.
Expand All @@ -207,7 +210,7 @@ class db {

/**
* Executes function for every record stored in db, whose keys are
* less than the *key*.
* less than the given *key*.
*
* @throws {Error} on any failure.
* @param {string} key - sets the upper bound for querying.
Expand All @@ -219,7 +222,7 @@ class db {

/**
* Executes function for every record stored in db, whose keys are
* greater than *key1* and less than *key2*.
* greater than the *key1* and less than the *key2*.
*
* @throws {Error} on any failure.
* @param {string} key1 - sets the lower bound for querying.
Expand Down

0 comments on commit bdb068b

Please sign in to comment.