returnR - Oppenjaimer/LbelDB.js GitHub Wiki
returnR(inx)
Return certain row or rows from local memory.
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
inx | number or number[] |
❌ | none | Index or indices of the row or rows to return. |
Returns: Array
or Array[]
- Row or rows data.
Example:
/*
dbs.lbel:
id
user
age
employed
dat.lbel:
10001
Jaime
28
false
*/
const ldb = require("lbeldb");
ldb.retrieve(); // Labels: ["id", "user", "age", "employed"], Rows: [ ["10001", "Jaime", "28", "false"] ]
console.log(ldb.returnR(0)); // Output: ["10001", "Jaime", "28" "false"]