Beispiel #1
0
// NewVar calls NewVar on the underlying *oracle.Cursor.
// This allows out binds, and if value is a pointer, then GetValue is not needed.
func NewVar(stmt driver.Stmt, value interface{}) (*oracle.Variable, error) {
	if stmt, ok := stmt.(varCreator); ok {
		return stmt.NewVar(value)
	}
	return nil, errgo.New("stmt must be a varCreator")
}