feat: Improve delete API with clear hard delete option

- Single clear way to hard delete: { hard: true }
- Removed confusing soft: false option
- Soft delete remains the default behavior
- Clean, intuitive API: delete() for soft, delete(id, { hard: true }) for hard
- All delete features working: soft, hard, cascade
This commit is contained in:
David Snelling 2025-08-18 18:17:06 -07:00
parent 6b4b67a339
commit 4b4c66b935
10 changed files with 17 additions and 36 deletions

View file

@ -187,7 +187,7 @@ describe('Brainy 1.0 Unified API', () => {
it('should hard delete when specified', async () => {
const id = await brainy.add("Data to hard delete")
const success = await brainy.delete(id, { soft: false })
const success = await brainy.delete(id, { hard: true })
expect(success).toBe(true)
})