Changes between Version 3 and Version 4 of FDORfc22
- Timestamp:
- 06/08/09 14:31:19 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc22
v3 v4 1 = FDO RFC 22 - Enhance expression engine concatfunction =1 = FDO RFC 22 - Enhance expression engine CONCAT function = 2 2 3 3 This page contains an change request (RFC) for the FDO Open Source project. … … 9 9 ||RFC Template Version||(1.0)|| 10 10 ||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|| 13 13 ||RFC Status||draft|| 14 14 ||Implementation Status||draft|| … … 27 27 == Motivation == 28 28 29 The existing concat function syntax is difficult to work with when multiple concatenations need to be done. It requires the concatfunctions be nested whenever a new item needs to be concatenated.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. 30 30 31 31 == Proposed Solution == 32 32 33 The proposed solution is to add support for an additional syntax to the concatfunction.33 The proposed solution is to add support for an additional syntax to the CONCAT function. 34 34 35 35 Old syntax: 36 36 {{{ 37 concat('Parcel ID: ', concat( PID , concat('\nOwner Name: ', concat( OWNER_NAME , concat('\nAddress: ', SITE_ADDR )))))37 CONCAT ('Parcel ID: ', CONCAT ( PID , CONCAT ('\nOwner Name: ', CONCAT ( OWNER_NAME , CONCAT ('\nAddress: ', SITE_ADDR ))))) 38 38 39 39 }}} … … 41 41 New syntax: 42 42 {{{ 43 concat('Parcel ID: ', PID , '\nOwner Name: ', OWNER_NAME, '\nAddress: ', SITE_ADDR )43 CONCAT ('Parcel ID: ', PID , '\nOwner Name: ', OWNER_NAME, '\nAddress: ', SITE_ADDR ) 44 44 45 45 }}} … … 47 47 The new syntax will consist of a comma delimited list of concatenation items. 48 48 49 In terms of API changes, the following addition to FdoFunctionDefinition class is proposed: 50 51 {{{ 52 class FdoFunctionDefinition : public FdoIDisposable 53 { 54 ... 55 56 public: 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 65 FDO_API virtual bool FdoFunctionDefinition::SupportsVariableArgumentsList() 66 { 67 return false; 68 } 69 }}} 70 71 FdoFunctionConcat will override SupportsVariableArgumentsList() to return true instead. It will relax the allowed number of literal values passed in for evaluation. 72 49 73 == Implications == 50 74 51 The existing concat function syntax will continue to be supported in addition to the new syntax. 75 The existing CONCAT function syntax will continue to be supported in addition to the new syntax. 76 77 The FDO managed FdoFunctionDefinition will be updated in a similar manner to reflect the proposed changes. 52 78 53 79 == Test Plan == 54 80 55 Test that the existing and new concat function syntax work.81 Test that the existing and new CONCAT function syntax work. Update the Expression Engine unit test to exercise CONCAT with extra arguments. 56 82 57 83 == Funding/Resources == 58 84 59 None at this time.85 Autodesk to provide resurces / funding.