示例#1
0
func (qs *QuadStore) Horizon() graph.PrimaryKey {
	var log MongoLogEntry
	err := qs.db.C("log").Find(nil).Sort("-LogID").One(&log)
	if err != nil {
		if err == mgo.ErrNotFound {
			return keys.NewSequentialKey(0)
		}
		glog.Errorf("Could not get Horizon from Mongo: %v", err)
	}
	return keys.NewSequentialKey(log.LogID)
}
示例#2
0
func (qs *store) Horizon() graph.PrimaryKey { return keys.NewSequentialKey(0) }
示例#3
0
func (qs *QuadStore) Horizon() graph.PrimaryKey {
	return keys.NewSequentialKey(qs.horizon)
}