If I am given an SQL query string, but I don't know beforehand whether it's a SELECT query (which requires using db.Query()) or a non-SELECT query (like INSERT, UPDATE, DELETE, or DDL, which requires using db.Exec()), is it possible for me to automatically determine which one to use (db.Query() or db.Exec())?
Is there a single function in Golang (without needing to inspect the query) that I can use which will return the correct result, whether it's for a SELECT query (which returns rows) or a non-SELECT query (which affects rows but doesn't return them)?