BlinkDB Logo blinkDB

createDB()

Creates a new database.

Using the db object, you can create new tables in which to save your entities.

const db = createDB();
OptionDescription
clone (default: true)Whether to clone entities received/sent from/to the user. See Performance

Performance

By default, blinkDB clones entities whenever you call insert() / update() or any query functions. While this means a slight hit to performance, this prevents you from modifying entities without blinkDB’s knowledge, which could lead to difficult to debug bugs.

If you’re sure that you can live with the risk, you can turn off cloning:

const db = createDB({
  clone: false,
});