farhanrahman / kyoto

18 stars 7 forks source link

Trade Transaction Data #116

Closed webbo89 closed 12 years ago

webbo89 commented 12 years ago

For logging country to country transactions, this is my suggestion to @farhanrahman as to how to save the data in a separate mongo collection. (to ensure no data is lost)

DBCollection tradecoll= db.getCollection("trades")

BasicDBObject trade= new BasicDBObject();

trade.put("simID", 6);
trade.put("type", "invest");
trade.put("buyer", GBR);
trade.put("seller", BAL);
trade.put("tick", 5);
trade.put("price", 435635);
trade.put("CO2", 434565635);

tradecoll.insert(trade);