MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / truncateQuery

Function truncateQuery

pkg/sql/parser/integration_test.go:203–210  ·  view source on GitHub ↗

truncateQuery truncates a query for logging purposes

(query string)

Source from the content-addressed store, hash-verified

201
202// truncateQuery truncates a query for logging purposes
203func truncateQuery(query string) string {
204 maxLen := 100
205 trimmed := strings.TrimSpace(query)
206 if len(trimmed) <= maxLen {
207 return trimmed
208 }
209 return trimmed[:maxLen] + "..."
210}
211
212// QueryFailure represents a failed query parse attempt
213type QueryFailure struct {

Callers 2

testDialectQueriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected