clearC - Oppenjaimer/LbelDB.js GitHub Wiki
clearC(inx)
Delete the column or columns at the specified index or indices from local memory.
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
inx | number or number[] or string or string[] |
❌ | none | Index or indices or label or labels of the column or columns to delete. |
Returns: void
Example:
const ldb = require("lbeldb");
ldb.init();
ldb.create(["user", "age", "employed"]); // Labels: ["id", "user", "age", "employed"]
ldb.addR(["Jaime", 28, false]); // Rows: [ [10001, "Jaime", 28, false] ]
ldb.clearC([1, 2]); // Labels: ["id", "user"], Rows: [ [10001, "Jaime"] ]