hasCommandPrefix checks if query starts with the given command prefix, ensuring it's followed by a word boundary (space, newline, semicolon, or end of string).
(query, prefix string)
| 792 | // catalog that can be referenced as ducklake.information_schema.*. |
| 793 | _, err := c.executor.ExecContext(ctx, "SELECT 1 FROM duckdb_tables() WHERE database_name = 'ducklake' LIMIT 1") |
| 794 | if err != nil { |
| 795 | c.logger().Warn("DuckLake connection unhealthy during cleanup, skipping SQL cleanup.", "error", err) |
| 796 | connHealthy = false |
| 797 | } |
| 798 | } else { |
| 799 | if err := c.executor.PingContext(ctx); err != nil { |
| 800 | c.logger().Warn("Database connection unhealthy during cleanup, skipping SQL cleanup.", "error", err) |
| 801 | connHealthy = false |
| 802 | } |
| 803 | } |
| 804 | cancel() |
| 805 | |
| 806 | // If we're in a transaction, explicitly ROLLBACK before closing. |
| 807 | // This prevents DuckDB from trying to ROLLBACK internally during Close(), |
no outgoing calls
no test coverage detected