Debug returns a new debug-client. It's used to get verbose logging on specific operations. client.Debug(). APIToken. Query(). Count(ctx)
()
| 275 | // Query(). |
| 276 | // Count(ctx) |
| 277 | func (c *Client) Debug() *Client { |
| 278 | if c.debug { |
| 279 | return c |
| 280 | } |
| 281 | cfg := c.config |
| 282 | cfg.driver = dialect.Debug(c.driver, c.log) |
| 283 | client := &Client{config: cfg} |
| 284 | client.init() |
| 285 | return client |
| 286 | } |
| 287 | |
| 288 | // Close closes the database connection and prevents new queries from starting. |
| 289 | func (c *Client) Close() error { |