Closed nickmarx12345678 closed 8 years ago
Would nice to be able to do a SELECT EXISTS query without using string formatting
var trueFalse bool sql := fmt.Sprintf("SELECT EXISTS(SELECT 1 FROM orders WHERE user_id = %v)", userId) err := db.SQL(sql). QueryScalar(&trueFalse)
This is supported
err := db.SQL("SELECT EXISTS(SELECT 1 FROM orders where user_id = $1", userId).QueryScalar(&trueFalse)
Or are you requesting an Exists method?
Exists
Would nice to be able to do a SELECT EXISTS query without using string formatting