func (dbc *Connection) PrepareContext(ctx context.Context, statement string, tx *sql.Tx) (stmt *sql.Stmt, err error) {
	if dbc.Tracer != nil {
		tf := dbc.Tracer.Prepare(ctx, dbc.Config, statement)
		if tf != nil {
			defer func() { tf.FinishPrepare(ctx, err) }()
		}
	}
	if tx != nil {
		stmt, err = tx.PrepareContext(ctx, statement)
		return
	}
	stmt, err = dbc.Connection.PrepareContext(ctx, statement)
	return
}
// PrepareContext prepares a statement within a given context.
// If a tx is provided, the tx is the target for the prepare.
// This will trigger tracing on prepare.
PrepareContext prepares a statement within a given context.
If a tx is provided, the tx is the target for the prepare.
This will trigger tracing on prepare.
// PrepareContext prepares a statement within a given context . // If a tx is provided the tx is the target for the prepare . // This will trigger tracing on prepare .
func (dbc *Connection) PrepareContext(ctx context.Context, statement string, tx *sql.Tx) (stmt *sql.Stmt, err error) {
	if dbc.Tracer != nil {
		tf := dbc.Tracer.Prepare(ctx, dbc.Config, statement)
		if tf != nil {
			defer func() { tf.FinishPrepare(ctx, err) }()
		}
	}
	if tx != nil {
		stmt, err = tx.PrepareContext(ctx, statement)
		return
	}
	stmt, err = dbc.Connection.PrepareContext(ctx, statement)
	return
}
func ( dbc * Connection ) PrepareContext ( ctx context . Context , statement string , tx * sql . Tx ) ( stmt * sql . Stmt , err error ) { if dbc . Tracer != nil { tf := dbc . Tracer . Prepare ( ctx , dbc . Config , statement ) if tf != nil { defer func ( ) { tf . FinishPrepare ( ctx , err ) } ( ) } } if tx != nil { stmt , err = tx . PrepareContext ( ctx , statement ) return } stmt , err = dbc . Connection . PrepareContext ( ctx , statement ) return }
PrepareContext prepares a statement within a given context.
PrepareContext prepares a statement within a given context .