Profile Picture

IDataAccessor Question

Posted By mseeli 7 Years Ago
Message
Posted Thursday March 11 2010
We are upgrading our existing data-store with the new version of RE.
I came across the method GetDateTimeAtIndex in IDataAccessor.

What is this supposed to do? When is it called? And what is meant with the index? Index of what?


Markus Seeli
Posted Thursday March 11 2010
See GetDateTimeAtIndex.

This will mostly be used internally by RightEdge to pluck data at the specified index in cases where the user has specified start or end dates on the system and we want to get that very specific data set.

mseeli (3/11/2010)
We are upgrading our existing data-store with the new version of RE.
I came across the method GetDateTimeAtIndex in IDataAccessor.

What is this supposed to do? When is it called? And what is meant with the index? Index of what?


Markus Seeli
Posted Thursday March 11 2010
Hmmm.....

I think I still don't get it

Here is how I see it:

We build a Data-Store that inherits from IDataStore.
In this datastore we have the method GetBarStorage that somehow gets called by RE when it needs to get historical data out of the datastore.

I assume that what is passed back to RE (as a IDataAccessor) functions kind of like a "delegate" in that it does not contain actual data but rather a way to access the Load-Method to then get the data.

In the Class that implements the IDataAccessor I did not keep a List as a private Variable, I expected that the List would just be passed along to RE without keeping a copy in the DataAccessor.

Is this how it is meant to work or do you expect me to keep a copy of the List in the DataAccessor. (In that case the GetTimeAtIndex would make sense)

Can I assume that GetCount is always called after a Load? At the moment I go and read the database every time GetCount is called but it would be much easyier if I just return the Count of the List.

Edited: Thursday March 11 2010 by mseeli
Posted Thursday March 11 2010
GetCount could be called at any time.

We've released the source code to the data storage plugins, so I'd recommend looking at our binary data store and LINQ to SQL data store plugins for examples of how to implement a data store plugin using the new interface.

Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems