(n *Node)
| 59 | } |
| 60 | |
| 61 | func dbUpsert(n *Node) (err error) { |
| 62 | session := db.Connection.Session.Copy() |
| 63 | defer session.Close() |
| 64 | c := session.DB(conf.MONGODB_DATABASE).C("Nodes") |
| 65 | _, err = c.Upsert(bson.M{"id": n.Id}, &n) |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | func dbFind(q bson.M, results *Nodes, order string, options map[string]int) (count int, err error) { |
| 70 | session := db.Connection.Session.Copy() |
no test coverage detected