wiki:FDORfc36

FDO RFC 36 - Schema Preview enhancement

This page contains an change request (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission Date June 08, 2009
Last Modified Dan StoicaTimestamp?
AuthorDan Stoica, Orest Halustchak
RFC Statusdraft
Implementation Statusdraft
Proposed Milestone3.5.0.0
Assigned PSC guide(s)Greg Boone
Voting History
+1
+0
-0
-1

Overview

This RFC is for adding the ability to preview the resulting schema definition before applying it.

Motivation

When the FDO user creates a new schema he doesn't know how the provider will mangle the class and property names. An example:

  • A bulk copy utility, when copies from one provider to another, will duplicate the input class in the output. But the names might not be valid for the target. The utility needs to preview the target schema and with user's input the names mangling can be prevented.

Automatic mangling, while convenient, raises readability issues. A specific case is SHP provider where the name of a property is limited to 11 characters. The names are truncated and added a unique numerical suffix, like "_N". The resulting name may contain just 2 or 3 useful multibyte characters instead of up to 5 characters.

Proposed Solution

The preferred solution is to add a new method on FdoIApplySchema command:

class FdoIApplySchema : public FdoICommand
{
...
public:
     FDO_API virtual FdoFeatureSchema* ExecutePreview() = 0;

The method will return a new schema object in case the provider is mangling the names (e.g. SHP). The method will return a deep copy of the input schema in case the provider doesn't mangle the names (e.g. SDF). This is the default behavior.

Implications

All the providers will have to implement the new method:

  • Implement the method in SHP to return mangled names if the case.
  • Implement the default behavior for the rest of open source providers.

Test Plan

Enhance existing unit tests and make sure the method always returns a schema identical to Describe Schema output. Test SHP provider with input names larger than 11 characters.

Funding/Resources?

Autodesk to provide resources / funding.

Last modified 9 years ago Last modified on Jun 9, 2009 10:40:31 AM