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

Method CollDelete

storage/connect/Mongo2Interface.java:503–529  ·  view source on GitHub ↗
(boolean all)

Source from the content-addressed store, hash-verified

501 } // end of CollUpdate
502
503 public long CollDelete(boolean all) {
504 long n = -1;
505
506 try {
507 WriteResult res;
508 BasicDBObject qry = new BasicDBObject();
509
510 if (!all)
511 qry.append("_id", doc.get("_id"));
512
513 res = coll.remove(qry);
514
515 if (DEBUG)
516 System.out.println("CollDelete: " + res.toString());
517
518 n = res.getN();
519 } catch (WriteConcernException wx) {
520 SetErrmsg(wx);
521 } catch (MongoException me) {
522 SetErrmsg(me);
523 } catch (UnsupportedOperationException ux) {
524 SetErrmsg(ux);
525 n = 0;
526 } // end try/catch
527
528 return n;
529 } // end of CollDelete
530
531} // end of class MongoInterface

Callers 2

mainMethod · 0.45
mainMethod · 0.45

Calls 4

SetErrmsgMethod · 0.95
appendMethod · 0.45
getMethod · 0.45
removeMethod · 0.45

Tested by 2

mainMethod · 0.36
mainMethod · 0.36