MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / decodeMeta

Function decodeMeta

go/model/model.go:321–330  ·  view source on GitHub ↗
(model *Model, meta []byte)

Source from the content-addressed store, hash-verified

319}
320
321func decodeMeta(model *Model, meta []byte) (err error) {
322 if model.Meta, err = simplejson.NewJson(meta); err != nil {
323 return
324 }
325 // (NOTE: lhw) we may decode more info later and make them
326 // as Model's fields
327 // for now, stay compatible with old interface
328 model.TrainSelect = model.GetMetaAsString("original_sql")
329 return nil
330}
331
332// MockInDB mocks a model meta structure which saved in database for testing
333func MockInDB(cwd, trainSelect, table string) error {

Callers 2

loadMetaFunction · 0.85
MockInDBFunction · 0.85

Calls 1

GetMetaAsStringMethod · 0.80

Tested by

no test coverage detected