Scalien.Table.GetKeyIterator C# (CSharp) Method

GetKeyIterator() public method

Return an iterator that will return only keys.
public GetKeyIterator ( ByteRangeParams ps ) : ByteKeyIterator
ps ByteRangeParams The parameters of iteration, as a .
return ByteKeyIterator
        public virtual ByteKeyIterator GetKeyIterator(ByteRangeParams ps)
        {
            return new ByteKeyIterator(this, ps);
        }

Same methods

Table::GetKeyIterator ( StringRangeParams ps ) : StringKeyIterator

Usage Example

Esempio n. 1
0
        public bool IsConsistent()
        {
            TestUser     user;
            TestUserInfo cmpinfo;

            byte[] row;

            // byte array?
            foreach (string key in table.GetKeyIterator(new StringRangeParams()))
            {
                user = GetUser(key);

                row = tableByNick.Get(System.Text.Encoding.UTF8.GetBytes(user.info.Nick + "|" + user.info.id.ToString()));
                if (row == null)
                {
                    return(false);
                }
                cmpinfo = Utils.JsonDeserialize <TestUserInfo>(row);
                if (user.info != cmpinfo)
                {
                    return(false);
                }

                row = tableByBirth.Get(System.Text.Encoding.UTF8.GetBytes(user.info.DateOfBirth + "|" + user.info.id.ToString()));
                if (row == null)
                {
                    return(false);
                }
                cmpinfo = Utils.JsonDeserialize <TestUserInfo>(row);
                if (user.info != cmpinfo)
                {
                    return(false);
                }

                row = tableByLastLogin.Get(System.Text.Encoding.UTF8.GetBytes(user.info.LastLogin + "|" + user.info.id.ToString()));
                if (row == null)
                {
                    return(false);
                }
                cmpinfo = Utils.JsonDeserialize <TestUserInfo>(row);
                if (user.info != cmpinfo)
                {
                    return(false);
                }
            }

            return(true);
        }
All Usage Examples Of Scalien.Table::GetKeyIterator