UNPKG

arlet-db

Version:

A simple database manager for Node.js

16 lines (11 loc) 516 B
[🏠 Inicio](../README.md) ## createTableIfNotExists ### Description: The createTableIfNotExists method creates a new table only if it does not already exist. This method ensures the table creation if it is missing. ### Usage: ```javascript const db = new ArletDb('path/to/database', 'myDatabase'); db.createTableIfNotExists('users', { name: 'string', age: 'number' }, 'age') .then(table => console.log('Table created if not exists:', table)) .catch(err => console.error('Error:', err)); ```