MCPcopy Create free account
hub / github.com/MariaDB/server / CollUpdate

Method CollUpdate

storage/connect/Mongo2Interface.java:479–501  ·  view source on GitHub ↗
(Object upd)

Source from the content-addressed store, hash-verified

477 } // end of CollInsert
478
479 public long CollUpdate(Object upd) {
480 long n = -1;
481
482 if (DEBUG)
483 System.out.println("upd: " + upd.toString());
484
485 try {
486 DBObject qry = new BasicDBObject("_id", doc.get("_id"));
487
488 WriteResult res = coll.update(qry, (DBObject) upd);
489
490 if (DEBUG)
491 System.out.println("CollUpdate: " + res.toString());
492
493 n = res.getN();
494 } catch (MongoException me) {
495 SetErrmsg(me);
496 } catch (Exception ex) {
497 SetErrmsg(ex);
498 } // end try/catch
499
500 return n;
501 } // end of CollUpdate
502
503 public long CollDelete(boolean all) {
504 long n = -1;

Callers 2

mainMethod · 0.45
mainMethod · 0.45

Calls 3

SetErrmsgMethod · 0.95
getMethod · 0.45
updateMethod · 0.45

Tested by 2

mainMethod · 0.36
mainMethod · 0.36