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

Function TestExtractMetadata_EmptyQuery

pkg/gosqlx/extract_test.go:638–647  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

636}
637
638func TestExtractMetadata_EmptyQuery(t *testing.T) {
639 metadata := ExtractMetadata(nil)
640 if metadata == nil {
641 t.Error("Expected non-nil Metadata for nil AST")
642 return
643 }
644 if len(metadata.Tables) > 0 || len(metadata.Columns) > 0 || len(metadata.Functions) > 0 {
645 t.Errorf("Expected empty metadata for nil AST, got: %+v", metadata)
646 }
647}
648
649func TestExtractColumns_WithCaseExpression(t *testing.T) {
650 // Skipping - CASE expressions not fully supported in parser yet

Callers

nothing calls this directly

Calls 3

ExtractMetadataFunction · 0.85
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected