RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



IDataAccessor Question Expand / Collapse
Message
Posted 3/11/2010 08:20:55 Post #11133
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
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 3/11/2010 08:36:10 Post #11136
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
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 3/11/2010 09:34:46 Post #11137
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
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.
Posted 3/11/2010 10:23:36 Post #11139
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
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
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:56am

2005-2007 © RightEdge Systems