Skip to content

Table waiters

Compare
Choose a tag to compare
@guregu guregu released this 21 Mar 15:28
· 95 commits to master since this release
757bab6

Summary

This release adds table waiters (#52 via #193).

  • CreateTable.Wait() creates the table, then blocks until the table is active
  • DeleteTable.Wait() deletes the table, then blocks until the table is finished deleting
  • Table.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