Changes between Version 3 and Version 4 of FDORfc22


Ignore:
Timestamp:
Jun 8, 2009, 2:31:19 PM (15 years ago)
Author:
danstoica
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc22

    v3 v4  
    1 = FDO RFC 22 - Enhance expression engine concat function =
     1= FDO RFC 22 - Enhance expression engine CONCAT function =
    22
    33This page contains an change request (RFC) for the FDO Open Source project. 
     
    99||RFC Template Version||(1.0)||
    1010||Submission Date|| June 25, 2008 ||
    11 ||Last Modified|| Bruce Dechant [[Timestamp]]||
    12 ||Author||Bruce Dechant||
     11||Last Modified|| Dan Stoica [[Timestamp]]||
     12||Author||Bruce Dechant, Dan Stoica, Orest Halustchak||
    1313||RFC Status||draft||
    1414||Implementation Status||draft||
     
    2727== Motivation ==
    2828
    29 The existing concat function syntax is difficult to work with when multiple concatenations need to be done. It requires the concat functions be nested whenever a new item needs to be concatenated.
     29The existing CONCAT function syntax is difficult to work with when multiple concatenations need to be done. It requires the CONCAT functions be nested whenever a new item needs to be concatenated.
    3030
    3131== Proposed Solution ==
    3232
    33 The proposed solution is to add support for an additional syntax to the concat function.
     33The proposed solution is to add support for an additional syntax to the CONCAT function.
    3434
    3535Old syntax:
    3636{{{
    37 concat('Parcel ID: ', concat( PID , concat('\nOwner Name: ', concat( OWNER_NAME , concat('\nAddress: ',  SITE_ADDR )))))
     37CONCAT ('Parcel ID: ', CONCAT ( PID , CONCAT ('\nOwner Name: ', CONCAT ( OWNER_NAME , CONCAT ('\nAddress: ',  SITE_ADDR )))))
    3838
    3939}}}
     
    4141New syntax:
    4242{{{
    43 concat('Parcel ID: ', PID , '\nOwner Name: ', OWNER_NAME, '\nAddress: ', SITE_ADDR )
     43CONCAT ('Parcel ID: ', PID , '\nOwner Name: ', OWNER_NAME, '\nAddress: ', SITE_ADDR )
    4444
    4545}}}
     
    4747The new syntax will consist of a comma delimited list of concatenation items.
    4848
     49In terms of API changes, the following addition to FdoFunctionDefinition class is proposed:
     50
     51{{{
     52class FdoFunctionDefinition : public FdoIDisposable
     53{
     54...
     55
     56public:
     57    /// \brief
     58    /// Indicates that this object allows its list of arguments to be variable so the
     59    /// last argument may be repeated.
     60    ///
     61    /// \return
     62    /// Returns false
     63    ///
     64
     65FDO_API virtual bool FdoFunctionDefinition::SupportsVariableArgumentsList()
     66{
     67    return false;
     68}
     69}}}
     70
     71FdoFunctionConcat will override SupportsVariableArgumentsList() to return true instead. It will relax the allowed number of literal values passed in for evaluation.
     72
    4973== Implications ==
    5074
    51 The existing concat function syntax will continue to be supported in addition to the new syntax.
     75The existing CONCAT function syntax will continue to be supported in addition to the new syntax.
     76
     77The FDO managed FdoFunctionDefinition will be updated in a similar manner to reflect the proposed changes.
    5278
    5379== Test Plan ==
    5480
    55 Test that the existing and new concat function syntax work.
     81Test that the existing and new CONCAT function syntax work. Update the Expression Engine unit test to exercise CONCAT with extra arguments.
    5682
    5783== Funding/Resources ==
    5884
    59 None at this time.
     85Autodesk to provide resurces / funding.