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

Function TestIntegration_CTEs

pkg/sql/integration_test.go:332–351  ·  view source on GitHub ↗

TestIntegration_CTEs tests Common Table Expression support

(t *testing.T)

Source from the content-addressed store, hash-verified

330
331// TestIntegration_CTEs tests Common Table Expression support
332func TestIntegration_CTEs(t *testing.T) {
333 projectRoot, _ := filepath.Abs(filepath.Join("..", ".."))
334 files := loadSQLTestFiles(t, projectRoot)
335
336 cteFiles := []SQLTestFile{}
337 for _, file := range files {
338 if strings.Contains(strings.ToUpper(file.Content), "WITH") &&
339 (strings.Contains(strings.ToUpper(file.Content), "AS (") ||
340 strings.Contains(strings.ToUpper(file.Content), "RECURSIVE")) {
341 cteFiles = append(cteFiles, file)
342 }
343 }
344
345 if len(cteFiles) == 0 {
346 t.Skip("No CTE test files found")
347 }
348
349 t.Logf("Found %d files with CTEs", len(cteFiles))
350 runTestBatch(t, cteFiles, "Common Table Expressions")
351}
352
353// TestIntegration_JOINs tests JOIN support across dialects
354func TestIntegration_JOINs(t *testing.T) {

Callers

nothing calls this directly

Calls 2

loadSQLTestFilesFunction · 0.85
runTestBatchFunction · 0.85

Tested by

no test coverage detected