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

Method CollUpdate

storage/connect/Mongo3Interface.java:572–592  ·  view source on GitHub ↗
(Object upd)

Source from the content-addressed store, hash-verified

570 } // end of CollInsert
571
572 public long CollUpdate(Object upd) {
573 long n = -1;
574
575 if (DEBUG)
576 System.out.println("upd: " + upd.toString());
577
578 try {
579 UpdateResult res = coll.updateOne(Filters.eq("_id", doc.get("_id")), (Bson) upd);
580
581 if (DEBUG)
582 System.out.println("CollUpdate: " + res.toString());
583
584 n = res.getModifiedCount();
585 } catch (MongoException me) {
586 SetErrmsg(me);
587 } catch (Exception ex) {
588 SetErrmsg(ex);
589 } // end try/catch
590
591 return n;
592 } // end of CollUpdate
593
594 public long CollDelete(boolean all) {
595 long n = -1;

Callers

nothing calls this directly

Calls 3

SetErrmsgMethod · 0.95
eqMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected