diff options
author | Benety Goh <benety@mongodb.com> | 2017-05-02 18:34:22 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2017-05-04 10:04:27 -0400 |
commit | da8feef15c25d10c084f846b70912cdc1956ed47 (patch) | |
tree | a709e99c20f5bafc782e1c55af5919301834cb7a /src/mongo/db/repl/optime.cpp | |
parent | 4b76e2cd5a49a64d0ba9789d800b61de90032274 (diff) | |
download | mongo-da8feef15c25d10c084f846b70912cdc1956ed47.tar.gz |
SERVER-28218 add IDL support to OpTime
Diffstat (limited to 'src/mongo/db/repl/optime.cpp')
-rw-r--r-- | src/mongo/db/repl/optime.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/repl/optime.cpp b/src/mongo/db/repl/optime.cpp index b722f692aaa..aa033d34bab 100644 --- a/src/mongo/db/repl/optime.cpp +++ b/src/mongo/db/repl/optime.cpp @@ -71,6 +71,11 @@ BSONObj OpTime::toBSON() const { return bldr.obj(); } +// static +OpTime OpTime::parse(const BSONObj& obj) { + return uassertStatusOK(parseFromOplogEntry(obj)); +} + std::string OpTime::toString() const { return toBSON().toString(); } |