schemaNames returns all names of all schemas which may have tables
(ctx context.Context, root doltdb.RootValue)
| 572 | |
| 573 | // schemaNames returns all names of all schemas which may have tables |
| 574 | func schemaNames(ctx context.Context, root doltdb.RootValue) ([]string, error) { |
| 575 | dbSchemas, err := root.GetDatabaseSchemas(ctx) |
| 576 | if err != nil { |
| 577 | return nil, err |
| 578 | } |
| 579 | |
| 580 | schNames := make([]string, len(dbSchemas)+1) |
| 581 | for i, dbSchema := range dbSchemas { |
| 582 | schNames[i] = dbSchema.Name |
| 583 | } |
| 584 | return schNames, nil |
| 585 | } |
| 586 | |
| 587 | // NodeStore implements the interface doltdb.RootValue. |
| 588 | func (root *RootValue) NodeStore() tree.NodeStore { |
no test coverage detected