Results 1 to 2 of 2

Thread: XTable Inserting rows without [] look up.

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    15

    Default XTable Inserting rows without [] look up.

    Is there a way to directly append to an XTABLE without doing a lookup?

    Sample code:

    xtable[newkey] = newrecord

    Which invokes
    byte[] index = KeyMap.Direct(key);
    FTable<TKey, TRecord> table = Retrieve((uint)index.Length, true);
    ulong oldCount = table.Count;
    table[index] = value;
    Count += table.Count - oldCount;

    ideally I'd like to

    xtable.Add(newkey,newrecord)

    that does appends to the table & increments the count, but it does not do the lookup

  2. #2

    Default

    The above line
    FTable<TKey, TRecord> table = Retrieve((uint)index.Length, true);
    
    does not make a record lookup. It just retrieve the appropriate FTable (from the FTable family behind the XTable instance) in which the record will be inserted.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.