// Truncate implements table.Table Truncate interface. func (t *Table) Truncate(ctx context.Context) (err error) { err = util.DelKeyWithPrefix(ctx, t.KeyPrefix()) if err != nil { return } return util.DelKeyWithPrefix(ctx, t.IndexPrefix()) }
// Truncate implements table.Table Truncate interface. func (t *Table) Truncate(rm kv.RetrieverMutator) error { err := util.DelKeyWithPrefix(rm, t.RecordPrefix()) if err != nil { return errors.Trace(err) } return util.DelKeyWithPrefix(rm, t.IndexPrefix()) }
// Truncate implements table.Table Truncate interface. func (t *Table) Truncate(ctx context.Context) error { err := util.DelKeyWithPrefix(ctx, t.KeyPrefix()) if err != nil { return errors.Trace(err) } return util.DelKeyWithPrefix(ctx, t.IndexPrefix()) }
// Truncate implements table.Table Truncate interface. func (t *Table) Truncate(ctx context.Context) error { txn, err := ctx.GetTxn(false) if err != nil { return errors.Trace(err) } err = util.DelKeyWithPrefix(txn, t.RecordPrefix()) if err != nil { return errors.Trace(err) } return util.DelKeyWithPrefix(txn, t.IndexPrefix()) }
// Truncate implements table.Table Truncate interface. func (t *Table) Truncate(ctx context.Context) (err error) { return util.DelKeyWithPrefix(ctx, t.KeyPrefix()) }