public void CanDeserializeARecordIdInEmbeddedMap()
        {
            // Arrange
            var recordCsvSerializer = new RecordCSVSerializer(null);
            const int integerField = 1;
            var orid = new ORID(1, 2);

            string recordString = "TestClassName@EmbeddedMap:{\"RecordIdField\":" + orid + "},TestField:" + integerField;

            // Act
            var actualDocument = recordCsvSerializer.Deserialize(recordString);

            // Assert
            Assert.AreEqual(orid, actualDocument.GetField<ORID>("EmbeddedMap.RecordIdField"));
            Assert.AreEqual(integerField, actualDocument.GetField<int>("TestField"));
        }
        public OSqlSelect From(ORID orid)
        {
            _sqlQuery.From(orid);

            return(this);
        }
Пример #3
0
 public OSqlUpdate Update(ORID orid)
 {
     return(new OSqlUpdate(_connection)
            .Update(orid));
 }
Пример #4
0
        public OSqlDeleteEdge To(ORID orid)
        {
            _sqlQuery.To(orid);

            return(this);
        }
Пример #5
0
        public OSqlDeleteEdge From(ORID orid)
        {
            _sqlQuery.From(orid);

            return(this);
        }
Пример #6
0
        public OSqlDeleteEdge Delete(ORID orid)
        {
            _sqlQuery.Record(orid);

            return(this);
        }
Пример #7
0
 public OSqlUpdate Update(ORID orid)
 {
     return(new OSqlUpdate(GetConnection())
            .Update(orid));
 }
Пример #8
0
        public OSqlUpdate Record(ORID orid)
        {
            _sqlQuery.Record(orid);

            return(this);
        }
Пример #9
0
        public OSqlDeleteDocument Record(ORID orid)
        {
            _sqlQuery.Record(orid);

            return(this);
        }
Пример #10
0
 public ORID(ORID other)
 {
     ClusterId = other.ClusterId;
     ClusterPosition = other.ClusterPosition;
 }
Пример #11
0
        public IOCreateEdge From(ORID orid)
        {
            _sqlQuery.From(orid);

            return(this);
        }
Пример #12
0
        public IOCreateEdge To(ORID orid)
        {
            _sqlQuery.To(orid);

            return(this);
        }
Пример #13
0
        private int ParseRecordID(int i, byte[] serializedRecord, out object result)
        {
            int startIndex = i;

            // search for end of parsed field value
            while (
                (i < serializedRecord.Length) &&
                (serializedRecord[i] != COMMA) &&
                (serializedRecord[i] != RIGHT_PAREN) &&
                (serializedRecord[i] != RIGHT_BRACKET) &&
                (serializedRecord[i] != GREATER_THAN))
            {
                i++;
            }
            var orid = new ORID(BinarySerializer.ToString(serializedRecord), startIndex);

            result = orid;

            return i;
        }