(addr string)
| 42 | type SelectPerRowCallback func(row []FieldValue) error |
| 43 | |
| 44 | func getNetProto(addr string) string { |
| 45 | proto := "tcp" |
| 46 | if strings.Contains(addr, "/") { |
| 47 | proto = "unix" |
| 48 | } |
| 49 | return proto |
| 50 | } |
| 51 | |
| 52 | // Connect to a MySQL server, addr can be ip:port, or a unix socket domain like /var/sock. |
| 53 | // Accepts a series of configuration functions as a variadic argument. |