Renamed SpecialTimestamp to BSONTimestamp

This commit is contained in:
Tomaz Beltram 2016-09-28 10:58:46 +02:00
parent 584a776d77
commit b042b892db
2 changed files with 7 additions and 7 deletions

View File

@ -291,7 +291,7 @@ inline void BSONWriter::write<NullValue>(NullValue& from)
{
}
struct SpecialTimestamp {
struct BSONTimestamp {
Poco::Timestamp ts;
Poco::Int32 inc;
};
@ -299,11 +299,11 @@ struct SpecialTimestamp {
// BSON Timestamp
// spec: int64
template<>
struct ElementTraits<SpecialTimestamp>
struct ElementTraits<BSONTimestamp>
{
enum { TypeId = 0x11 };
static std::string toString(const SpecialTimestamp& value, int indent = 0)
static std::string toString(const BSONTimestamp& value, int indent = 0)
{
std::string result;
result.append(1, '"');
@ -317,7 +317,7 @@ struct ElementTraits<SpecialTimestamp>
template<>
inline void BSONReader::read<SpecialTimestamp>(SpecialTimestamp& to)
inline void BSONReader::read<BSONTimestamp>(BSONTimestamp& to)
{
Poco::Int64 value;
_reader >> value;
@ -328,7 +328,7 @@ inline void BSONReader::read<SpecialTimestamp>(SpecialTimestamp& to)
template<>
inline void BSONWriter::write<SpecialTimestamp>(SpecialTimestamp& from)
inline void BSONWriter::write<BSONTimestamp>(BSONTimestamp& from)
{
Poco::Int64 value = from.ts.epochMicroseconds() / 1000;
value <<= 32;

View File

@ -96,8 +96,8 @@ void Document::read(BinaryReader& reader)
case ElementTraits<Poco::Timestamp>::TypeId:
element = new ConcreteElement<Poco::Timestamp>(name, Poco::Timestamp());
break;
case ElementTraits<SpecialTimestamp>::TypeId:
element = new ConcreteElement<SpecialTimestamp>(name, SpecialTimestamp());
case ElementTraits<BSONTimestamp>::TypeId:
element = new ConcreteElement<BSONTimestamp>(name, BSONTimestamp());
break;
case ElementTraits<NullValue>::TypeId:
element = new ConcreteElement<NullValue>(name, NullValue(0));