[fdo-internals] [Select] Empty reader or NULL?
mateusz at loskot.net
Mon Mar 19 20:43:20 EDT 2007
I'd like to ask about semantic details of FdoISelect::Execute()
operation, especially in DBMS provider.
For instance, if a feature class is directly mapped to table in a database.
Let's imagine the code below is called by a client:
// Connection is Open
cmd = static_cast<FdoISelect*>(
assert(0 != cmd);
// NOTE: Querying non-existing class
// XXX - What Execute() is supposed to return here?
FdoPtr<FdoIFeatureReader> reader = cmd->Execute();
My question is as in line marked with XXX:
If a client queries for a feature class that does not
exist (a non-existing table), what the Execute() operation is supposed
Is it safe to return NULL pointer to a reader?
Or it should return a kind of empty (terminating) reader, however here I
have no idea how to achieve this kind of feature.
Or an exception is thrown from Execute()?
More information about the fdo-internals