UNPKG

arlet-db

Version:

A simple database manager for Node.js

15 lines (11 loc) 469 B
[🏠 Inicio](../README.md) ## insertIfNotExists ### Description: The insertIfNotExists method inserts a new row of data into a specified table only if the data does not already exist. ## Usage: ````javascript const db = new ArletDb('path/to/database', 'myDatabase'); db.insertIfNotExists('users', { name: 'John Doe', age: 30 }) .then(result => console.log('Data inserted if not exists:', result)) .catch(err => console.error('Error:', err)); ````