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

Function TestIntegration_WindowFunctions

pkg/sql/integration_test.go:309–329  ·  view source on GitHub ↗

TestIntegration_WindowFunctions tests window function support across dialects

(t *testing.T)

Source from the content-addressed store, hash-verified

307
308// TestIntegration_WindowFunctions tests window function support across dialects
309func TestIntegration_WindowFunctions(t *testing.T) {
310 projectRoot, _ := filepath.Abs(filepath.Join("..", ".."))
311 files := loadSQLTestFiles(t, projectRoot)
312
313 windowFiles := []SQLTestFile{}
314 for _, file := range files {
315 if strings.Contains(strings.ToLower(file.Content), "over") &&
316 (strings.Contains(strings.ToLower(file.Content), "partition") ||
317 strings.Contains(strings.ToLower(file.Content), "row_number") ||
318 strings.Contains(strings.ToLower(file.Content), "rank")) {
319 windowFiles = append(windowFiles, file)
320 }
321 }
322
323 if len(windowFiles) == 0 {
324 t.Skip("No window function test files found")
325 }
326
327 t.Logf("Found %d files with window functions", len(windowFiles))
328 runTestBatch(t, windowFiles, "Window Functions")
329}
330
331// TestIntegration_CTEs tests Common Table Expression support
332func TestIntegration_CTEs(t *testing.T) {

Callers

nothing calls this directly

Calls 2

loadSQLTestFilesFunction · 0.85
runTestBatchFunction · 0.85

Tested by

no test coverage detected