MCPcopy Index your code
hub / github.com/micro/go-micro / schema

Method schema

model/sqlite/sqlite.go:84–93  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

82}
83
84func (d *sqliteModel) schema(v interface{}) (*model.Schema, error) {
85 t := model.ResolveType(v)
86 d.mu.RLock()
87 s, ok := d.types[t]
88 d.mu.RUnlock()
89 if !ok {
90 return nil, model.ErrNotRegistered
91 }
92 return s, nil
93}
94
95func (d *sqliteModel) Create(ctx context.Context, v interface{}) error {
96 schema, err := d.schema(v)

Callers 5

CreateMethod · 0.95
ReadMethod · 0.95
UpdateMethod · 0.95
DeleteMethod · 0.95
CountMethod · 0.95

Calls 1

ResolveTypeFunction · 0.92

Tested by

no test coverage detected