2
0

Add ConnConfig.PreferSimpleProtocol

Allows configuring on a connection basis to prefer the simple protocol /
disable implicit prepared statements.

refs #331
This commit is contained in:
Jack Christensen
2017-12-16 12:46:27 -06:00
parent 50627257f9
commit bd76a96882
3 changed files with 38 additions and 2 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ func (c *Conn) QueryEx(ctx context.Context, sql string, options *QueryExOptions,
return rows, rows.err
}
if options != nil && options.SimpleProtocol {
if (options == nil && c.config.PreferSimpleProtocol) || (options != nil && options.SimpleProtocol) {
err = c.sanitizeAndSendSimpleQuery(sql, args...)
if err != nil {
rows.fatal(err)