[fdo-internals] Connection state and commands

Greg Boone greg.boone at autodesk.com
Tue Feb 20 14:13:48 EST 2007

Se inline...

-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Mateusz
Sent: Friday, February 16, 2007 3:11 PM
To: fdo-internals
Subject: [fdo-internals] Connection state and commands


Is there any general rule about what connection state is required
for what command or it is provider specific?

For example:

- FdoConnectionState_Open is required for commands like:

SQLCommand or Select Command
[GB] Yes. This is the rule.

- FdoConnectionState_Pending is a minimum requirement for commands like

[GB] Yes, this is also the typically state at which point these commands
are run.

Now, is this assumed, across all FDO providers, that ListDataStores
or CreateDataStore will only work with connection of state open?
[GB] No. These commands should at  minimum be executable with a
connection state of pending

Perhaps, I a provider developer has liberty to set a requirement
that if connection is open to a particular datastore,
it's not possile to call commands operating on datastores:
CreateDataStore, DestroyDataStore, ListDataStores,
but pending connection is required?
[GB] You could do this, but that may be too restrictive. There may be
some unforeseen use case where a user would wish to execute these
commands which in an Open state. However, I would argue that we should
be consistent across all RDBMS providers and enforce a general rule. 

Similarly, if connection state == pending it shouldn't be possible to
create any commands other than operating on datastores.
[GB] Yes, typically only datastore commands should be available at this

As I see in available providers, it's handled differently:
- one provider validates connection state before creating commands
- another doesn't check the state at all
[GB] I would argue that providers should always check their internal
state before creating commands. To do otherwise sounds like a defect. 

Mateusz Loskot
fdo-internals mailing list
fdo-internals at lists.osgeo.org

More information about the fdo-internals mailing list