예제 #1
0
func NewDatasetVersion(h *data.Handle) *DatasetVersion {
	return &DatasetVersion{
		Path:    h.Path(),
		Version: h.Version,
		Dataset: h.Dataset(),
	}
}
예제 #2
0
func (i *IndexDB) GetDatasetVersion(h *data.Handle) (*DatasetVersion, error) {
	if h == nil || !h.Valid() {
		return nil, fmt.Errorf("Invalid dataset handle: %v.", h)
	}

	ret, err := i.ds.Get(HandleKey(h))
	out, _ := ret.(*DatasetVersion)
	return out, err
}