Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv22685
Modified Files:
Entity.py CHANGES
Log Message:
Fixed Entity.externalNameForInternalName(): when used with names
containing figures (such as i 'db2Id')
externalNameForInternalName(nameForExternalName()) was not idempotent
Applied a patch submitted by Yannick Gingras. Thanks!
Index: Entity.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Entity.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Entity.py 27 May 2003 19:37:28 -0000 1.12
--- Entity.py 10 Jun 2003 16:31:32 -0000 1.13
***************
*** 61,66 ****
Turns an entity name into a valid name for database schema.
! With the default parameters, 'address' becomes 'ADDRESS' and
! 'firstName' into 'FIRST_NAME'
Default separatorString is '_'.
--- 61,66 ----
Turns an entity name into a valid name for database schema.
! With the default parameters, 'address' becomes 'ADDRESS',
! 'firstName' becomes 'FIRST_NAME', and 'db2Id' becomes 'DB2_ID'
Default separatorString is '_'.
***************
*** 71,75 ****
#letters, instead of upper case ones.
#if useCaps:
! _regexp=re.compile('([a-z])([A-Z])')
_results=_regexp.sub('\\1'+separatorString+'\\2', aName)
#else:
--- 71,75 ----
#letters, instead of upper case ones.
#if useCaps:
! _regexp=re.compile('([a-z0-9])([A-Z])')
_results=_regexp.sub('\\1'+separatorString+'\\2', aName)
#else:
***************
*** 82,88 ****
def nameForExternalName(aName, separatorString='_', initialCaps=0):
"""
! Inverse function of externalNameForInternalName...
! Example: 'FIRST_NAME' becomes 'firstName'
and 'ENTITY_NAME' becomes 'EntityName' when initialCaps is set to '1'.
"""
--- 82,88 ----
def nameForExternalName(aName, separatorString='_', initialCaps=0):
"""
! Inverse function of externalNameForInternalName()
! Example: 'FIRST_NAME' becomes 'firstName', 'DB2_ID' becomes 'db2Id'
and 'ENTITY_NAME' becomes 'EntityName' when initialCaps is set to '1'.
"""
Index: CHANGES
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -d -r1.106 -r1.107
*** CHANGES 31 May 2003 15:14:59 -0000 1.106
--- CHANGES 10 Jun 2003 16:31:33 -0000 1.107
***************
*** 8,11 ****
--- 8,18 ----
--------------------------------------------------------
+ * Fixed Entity.externalNameForInternalName(): when used with names
+ containing figures (such as i 'db2Id')
+ externalNameForInternalName(nameForExternalName()) was not idempotent
+ Applied a patch submitted by Yannick Gingras. Thanks!
+
+ * REMOVED dependency for 4Suite (was in 0.9pre8, forgot to announce)
+
* 'TEXT' field now accepts a width to be set (ignored when generating the
database schema, but checked, if set, when validating an attribute's
|