Table waiters
Summary
This release adds table waiters (#52 via #193).
CreateTable.Wait()
creates the table, then blocks until the table is activeDeleteTable.Wait()
deletes the table, then blocks until the table is finished deletingTable.Wait(...)
blocks until the table's status matches one of the arguments (for custom waiting purposes)
Example
// blocks until table is ready to use
if err := db.CreateTable(name, Widget{}).Wait(); err != nil {
panic(err)
}
// blocks until table is finished deleting
if err := db.Table(name).DeleteTable().Wait(); err != nil {
panic(err)
}
What's Changed
Full Changelog: v1.14.0...v1.15.0