Skip to content

Commit

Permalink
fix get object tables
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Oct 16, 2024
1 parent 158a782 commit 7d17a68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions go/adbc/driver/snowflake/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ func (c *connectionImpl) GetObjects(ctx context.Context, depth adbc.ObjectDepth,
catalog, dbSchema, tableName, &showSchemaQueryID)
goGetQueryID(gQueryIDsCtx, conn, gQueryIDs, objDatabases,
catalog, dbSchema, tableName, &terseDbQueryID)
objType := "objects"
objType := objObjects
if len(tableType) == 1 {
if strings.EqualFold("VIEW", tableType[0]) {
objType = "views"
objType = objViews
} else if strings.EqualFold("TABLE", tableType[0]) {
objType = "tables"
objType = objTables
}
}
goGetQueryID(gQueryIDsCtx, conn, gQueryIDs, objType,
Expand Down Expand Up @@ -270,12 +270,12 @@ func (c *connectionImpl) GetObjects(ctx context.Context, depth adbc.ObjectDepth,
goGetQueryID(gQueryIDsCtx, conn, gQueryIDs, objSchemas,
catalog, dbSchema, tableName, &showSchemaQueryID)

objType := "objects"
objType := objObjects
if len(tableType) == 1 {
if strings.EqualFold("VIEW", tableType[0]) {
objType = "views"
objType = objViews
} else if strings.EqualFold("TABLE", tableType[0]) {
objType = "tables"
objType = objTables
}
}
goGetQueryID(gQueryIDsCtx, conn, gQueryIDs, objType,
Expand Down

0 comments on commit 7d17a68

Please sign in to comment.