Const
This instance is created using the Database
class from the dexie
package.
It can be used to perform various database operations such as querying, inserting, updating, and deleting data.
import { db } from '@envoy1084/react-terminal';
// Insert a new record
db.history.put({
type: 'command',
command: 'ls',
})
// Query records
const result = await db.history.where('type').equals('command').toArray();
console.log(result); // [{ id: 1, type: 'command', command: 'ls' }]
Generated using TypeDoc
The database instance used for storing data.