Driver savepoints.

This commit is contained in:
Nuno Cruces
2023-11-07 15:19:40 +00:00
parent 6b28be6d0e
commit c00927e8bb
4 changed files with 56 additions and 11 deletions

View File

@@ -269,6 +269,12 @@ func (c *conn) ExecContext(ctx context.Context, query string, args []driver.Name
return nil, driver.ErrSkip
}
if savept, ok := ctx.(*saveptCtx); ok {
// Called from driver.Savepoint.
savept.Savepoint = c.Savepoint()
return resultRowsAffected(-1), nil
}
old := c.Conn.SetInterrupt(ctx)
defer c.Conn.SetInterrupt(old)