MCPcopy Create free account
hub / github.com/dolthub/doltgresql / nodeUnresolvedObjectName

Function nodeUnresolvedObjectName

server/ast/unresolved_object_name.go:24–48  ·  view source on GitHub ↗

nodeUnresolvedObjectName handles *tree.UnresolvedObjectName nodes.

(ctx *Context, node *tree.UnresolvedObjectName)

Source from the content-addressed store, hash-verified

22
23// nodeUnresolvedObjectName handles *tree.UnresolvedObjectName nodes.
24func nodeUnresolvedObjectName(ctx *Context, node *tree.UnresolvedObjectName) (vitess.TableName, error) {
25 if node == nil {
26 return vitess.TableName{}, nil
27 }
28
29 var tableName vitess.TableIdent
30 var dbQual vitess.TableIdent
31 var schemaQual vitess.TableIdent
32
33 tableName = vitess.NewTableIdent(node.Parts[0])
34
35 if node.NumParts > 1 {
36 schemaQual = vitess.NewTableIdent(node.Parts[1])
37 }
38
39 if node.NumParts > 2 {
40 dbQual = vitess.NewTableIdent(node.Parts[2])
41 }
42
43 return vitess.TableName{
44 Name: tableName,
45 DbQualifier: dbQual,
46 SchemaQualifier: schemaQual,
47 }, nil
48}

Callers 7

nodeShowIndexesFunction · 0.85
nodeShowCreateFunction · 0.85
nodeCreateTypeFunction · 0.85
nodeTableExprFunction · 0.85
nodeExplainFunction · 0.85
nodeRenameTableFunction · 0.85
nodeCreateDomainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected