I have a sql select statement like this example:
queryValues = make([]interface{}, 0, 5)
queryValues = append(Name, obj.Name)
queryValues = append(Age, obj.Age)
whereClause := "where name = $1 and age = $2"
query := fmt.Sprintf("Select * from Table1 %s;", whereClause)
rows, err := dbConnection.Query(query, queryValues...)
I have several questions here. What is the ... after queryValues? How come when I look at the query being passed up to the db none of the $1 are actually being converted into there real values?
What print function can I run to mimic dbConnection.Query(query, queryValues...) so that I can see it before it is passed up?
Thanks in advance.
Josh