addC - Oppenjaimer/LbelDB.js GitHub Wiki
addC(col)
Add a new column or columns to local memory.
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
col | string or string[] |
❌ | none | Name or names of the column or columns to add. |
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.addC("email"); // Labels: ["id", "user", "age", "employed", "email"], Rows: [ [10001, "Jaime", 28, false, ""] ]