func (*Tx) QueryRowContext

func (tx *Tx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *Row

执行最多返回一行的查询。QueryRowContext 总是返回一个非空值。错误将推迟到调用 Row 的 Scan 方法之后。如果查询没有选择任何行,Row.Scan 将返回 ErrNoRows。否则,Row.Scan将扫描第一个选定的行并丢弃其余的行。