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

Method SetSchemas

core/storage/storage.go:110–116  ·  view source on GitHub ↗

SetSchemas sets the given schemas and returns a new storage object.

(ctx context.Context, dbSchemas []schema.DatabaseSchema)

Source from the content-addressed store, hash-verified

108
109// SetSchemas sets the given schemas and returns a new storage object.
110func (r RootStorage) SetSchemas(ctx context.Context, dbSchemas []schema.DatabaseSchema) (RootStorage, error) {
111 msg, err := r.serializeRootValue(r.SRV.TablesBytes(), dbSchemas)
112 if err != nil {
113 return RootStorage{}, err
114 }
115 return RootStorage{msg}, nil
116}
117
118// Clone returns a clone of the calling storage.
119func (r RootStorage) Clone() RootStorage {

Callers 2

CreateDatabaseSchemaMethod · 0.80
DropDatabaseSchemaMethod · 0.80

Calls 2

serializeRootValueMethod · 0.95
TablesBytesMethod · 0.80

Tested by

no test coverage detected