func (d *DGraphAccess) InTransactionDo(ctx context.Context, do func(da *DGraphAccess) error) error {
	wtx := d.ForReadWrite(ctx)
	defer wtx.Discard()
	if err := do(wtx); err != nil {
		return err
	}
	return wtx.Commit()
}
// InTransactionDo calls a function with a prepared DGraphAccess with a Write transaction.
// The encapsulated transaction is available from the receiver using Transaction().
// Return an error if the Commit fails.
InTransactionDo calls a function with a prepared DGraphAccess with a Write transaction.
The encapsulated transaction is available from the receiver using Transaction().
Return an error if the Commit fails.
// InTransactionDo calls a function with a prepared DGraphAccess with a Write transaction . // The encapsulated transaction is available from the receiver using Transaction () . // Return an error if the Commit fails .
func (d *DGraphAccess) InTransactionDo(ctx context.Context, do func(da *DGraphAccess) error) error {
	wtx := d.ForReadWrite(ctx)
	defer wtx.Discard()
	if err := do(wtx); err != nil {
		return err
	}
	return wtx.Commit()
}
func ( d * DGraphAccess ) InTransactionDo ( ctx context . Context , do func ( da * DGraphAccess ) error ) error { wtx := d . ForReadWrite ( ctx ) defer wtx . Discard ( ) if err := do ( wtx ) ; err != nil { return err } return wtx . Commit ( ) }
InTransactionDo calls a function with a prepared DGraphAccess with a Write transaction.
InTransactionDo calls a function with a prepared DGraphAccess with a Write transaction .