Skip to content

Stored Procedure #1926

Discussion options

You must be logged in to vote

This works

       var SomeColumn []string
	_, err = db.QueryOne(&SomeColumn, "SELECT foofunction(?,?) as SomeColumn", arg1,
		arg2)
	if err != nil {
		return "",err
	}
	if len(SomeColumn) == 0 {
		err == errors.New("empty rows")
		return "",err
	}
	if len(SomeColumn[0]) == 0 {
		err == errors.New("empty value")
		return "",err
	}
	return SomeColumn[0],err

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ganesh-karthick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant