SurrealDB Docs Logo

Enter a search query

.Delete()

Method Syntax
db.Delete[T any, R any](resource)

Arguments

ArgumentsDescription
thing required

The table name or a RecordId to delete.

Example usage

// Delete an entry by ID if err = surrealdb.Delete[models.RecordID](db, *person2.ID); err != nil { panic(err) } // Delete all entries if err = surrealdb.Delete[models.Table](db, models.Table("persons")); err != nil { panic(err) }

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install