modeling-cvs Mailing List for Object-Relational Bridge for python (Page 26)
Status: Abandoned
Brought to you by:
sbigaret
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(54) |
Apr
(29) |
May
(94) |
Jun
(47) |
Jul
(156) |
Aug
(132) |
Sep
(40) |
Oct
(6) |
Nov
(18) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(18) |
Feb
(59) |
Mar
(7) |
Apr
|
May
(8) |
Jun
(2) |
Jul
(12) |
Aug
(15) |
Sep
(12) |
Oct
(6) |
Nov
(25) |
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(27) |
Mar
|
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sbi...@us...> - 2003-06-11 11:13:51
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv26363/DatabaseAdaptors/SQLiteAdaptorLayer Added Files: TODO Log Message: Added a new adaptor layer for SQLite --- NEW FILE: TODO --- ModelValidation does not check that RIGHT and FULL OUTER JOIN are not used (sqlite does not support them) |
From: <sbi...@us...> - 2003-06-11 11:10:47
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv24498 Modified Files: CHANGES ModelValidation.py Log Message: Added a new adaptor layer for SQLite Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** CHANGES 10 Jun 2003 16:31:33 -0000 1.107 --- CHANGES 11 Jun 2003 11:10:11 -0000 1.108 *************** *** 8,11 **** --- 8,13 ---- -------------------------------------------------------- + * New adaptor layer for SQLite + * Fixed Entity.externalNameForInternalName(): when used with names containing figures (such as i 'db2Id') Index: ModelValidation.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/ModelValidation.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ModelValidation.py 14 Mar 2003 14:33:40 -0000 1.6 --- ModelValidation.py 11 Jun 2003 11:10:12 -0000 1.7 *************** *** 209,213 **** msgs=[] if model.adaptorName(): ! if model.adaptorName() not in ('Postgresql', 'MySQL'): msgs.append("adaptorName '%s' is not one of the framework's, maybe one"\ " of yours"%model.adaptorName()) --- 209,213 ---- msgs=[] if model.adaptorName(): ! if model.adaptorName() not in ('Postgresql', 'MySQL', 'SQLite'): msgs.append("adaptorName '%s' is not one of the framework's, maybe one"\ " of yours"%model.adaptorName()) |
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv24498/tests Modified Files: test_EditingContext_Global.py test_EditingContext_Global_Inheritance.py test_EditingContext_ParentChild.py Added Files: SQLite.cfg Log Message: Added a new adaptor layer for SQLite --- NEW FILE: SQLite.cfg --- # This file is used to initalize the model's connection dictionary and # adaptor's name when the tests are run for SQLite # Change this to reflect your own configuration [DEFAULT] adaptor: SQLite host: ignored user: ignored password: ignored [AuthorBooks] database: db_AuthorBooks.db [StoreEmployees] database: db_StoreEmployees.db Index: test_EditingContext_Global.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** test_EditingContext_Global.py 7 May 2003 11:27:10 -0000 1.20 --- test_EditingContext_Global.py 11 Jun 2003 11:10:18 -0000 1.21 *************** *** 114,117 **** --- 114,122 ---- self.failIf('fk_writer_id' in object.__dict__.keys()) self.failIf('_fk_writer_id' in object.__dict__.keys()) + + # check types + self.failIf(cleese.getAge()!=24) + from mx.DateTime import DateTime + self.failUnless(type(cleese.getBirthday())!=DateTime) #print objects #print objects[0].getE1() *************** *** 768,772 **** self.failIf(nb_objs!=3) # only 3: author 'Dard' is the only # one with a pygmalion ! def test_15_propagatesInsertionForRelatedObjects_01(self): "[EditingContext] propagatesInsertionForRelatedObjects (updated objects)" --- 773,777 ---- self.failIf(nb_objs!=3) # only 3: author 'Dard' is the only # one with a pygmalion ! def test_15_propagatesInsertionForRelatedObjects_01(self): "[EditingContext] propagatesInsertionForRelatedObjects (updated objects)" *************** *** 895,898 **** --- 900,907 ---- adaptorChannel.adaptorContext().beginTransaction() + if database_cfg=='SQLite.cfg': + sqlExpr2=adaptorChannel.adaptorContext().adaptor().expressionClass()() + sqlExpr2.setStatement('-- types int') + adaptorChannel.evaluateExpression(sqlExpr2) adaptorChannel.evaluateExpression(sqlExpr) row=adaptorChannel.fetchRow() *************** *** 901,905 **** self.failUnless(row.get('age', None)) ! self.failUnless(row['age']==508) adaptorChannel.cancelFetch() --- 910,914 ---- self.failUnless(row.get('age', None)) ! self.failUnless(int(row['age'])==508) adaptorChannel.cancelFetch() *************** *** 1001,1005 **** -h Prints this message -p enables profiling ! -d sets the database adaptor to use: Postgresql (default) or MySQL -r reinitialize the (postgresql) database the database defined in the model 'model_AuthorBooks' --- 1010,1014 ---- -h Prints this message -p enables profiling ! -d sets the database adaptor to use: Postgresql (default), MySQL or SQLite -r reinitialize the (postgresql) database the database defined in the model 'model_AuthorBooks' *************** *** 1032,1036 **** if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL'): usage(me, 1) database_cfg='%s.cfg'%v continue --- 1041,1045 ---- if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL', 'SQLite'): usage(me, 1) database_cfg='%s.cfg'%v continue Index: test_EditingContext_Global_Inheritance.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global_Inheritance.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** test_EditingContext_Global_Inheritance.py 7 May 2003 11:27:10 -0000 1.9 --- test_EditingContext_Global_Inheritance.py 11 Jun 2003 11:10:20 -0000 1.10 *************** *** 385,389 **** is altered: tables are dropped, then they are re-created along with constraints for PKs and FKs and PK support (sequences) ! -d sets the database adaptor to use: Postgresql (default) or MySQL """ % prgName if exitStatus is not None: --- 385,389 ---- is altered: tables are dropped, then they are re-created along with constraints for PKs and FKs and PK support (sequences) ! -d sets the database adaptor to use: Postgresql (default), MySQL or SQLite """ % prgName if exitStatus is not None: *************** *** 410,414 **** if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL'): usage(me, 1) database_cfg='%s.cfg'%v continue --- 410,414 ---- if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL', 'SQLite'): usage(me, 1) database_cfg='%s.cfg'%v continue Index: test_EditingContext_ParentChild.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_ParentChild.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_EditingContext_ParentChild.py 7 May 2003 11:27:10 -0000 1.7 --- test_EditingContext_ParentChild.py 11 Jun 2003 11:10:20 -0000 1.8 *************** *** 494,498 **** -h Prints this message -p enables profiling ! -d sets the database adaptor to use: Postgresql (default) or MySQL -r reinitialize the (postgresql) database the database defined in the model 'model_testBothSidesRels' --- 494,498 ---- -h Prints this message -p enables profiling ! -d sets the database adaptor to use: Postgresql (default),MySQL or SQLite -r reinitialize the (postgresql) database the database defined in the model 'model_testBothSidesRels' *************** *** 524,528 **** if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL'): usage(me, 1) database_cfg='%s.cfg'%v continue --- 524,528 ---- if k=='-p': profile=1; continue if k=='-d': ! if v not in ('Postgresql', 'MySQL', 'SQLite'): usage(me, 1) database_cfg='%s.cfg'%v continue |
From: <sbi...@us...> - 2003-06-11 11:02:54
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv21793 Modified Files: DatabaseContext.py Log Message: Added new adaptor layer for SQLite / sqlite is typeless: fixed objectsCountWithFetchSpecification() to convert result to integer Index: DatabaseContext.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseContext.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DatabaseContext.py 14 Mar 2003 11:40:07 -0000 1.14 --- DatabaseContext.py 11 Jun 2003 11:02:49 -0000 1.15 *************** *** 1433,1438 **** for entityName in entitiesNames: aFetchSpec.setEntityName(entityName) ! count+=channel.selectCountObjectsWithFetchSpecification(aFetchSpec, anEditingContext) return count --- 1433,1439 ---- for entityName in entitiesNames: aFetchSpec.setEntityName(entityName) ! c=channel.selectCountObjectsWithFetchSpecification(aFetchSpec, anEditingContext) + count+=int(c) # SQLite return count |
From: <sbi...@us...> - 2003-06-11 09:31:27
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv20094/DatabaseAdaptors/SQLiteAdaptorLayer Log Message: Directory /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer added to the repository |
From: <sbi...@us...> - 2003-06-10 18:01:45
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv15255/DatabaseAdaptors/PostgresqlAdaptorLayer Modified Files: PostgresqlSQLExpression.py Log Message: Fixed typos Index: PostgresqlSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer/PostgresqlSQLExpression.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PostgresqlSQLExpression.py 31 May 2003 15:11:43 -0000 1.2 --- PostgresqlSQLExpression.py 10 Jun 2003 17:30:34 -0000 1.3 *************** *** 34,38 **** __version__='$Revision$'[11:-2] ! from Modeling.SQLExpression import SQLExpression, DateType import string --- 34,38 ---- __version__='$Revision$'[11:-2] ! from Modeling.SQLExpression import SQLExpression, DateType, CharacterType import string *************** *** 111,115 **** 'timestamp without time zone': DateType, 'timestamp with time zone': DateType, ! 'text', CharacterType, } values.update(additional_values) --- 111,115 ---- 'timestamp without time zone': DateType, 'timestamp with time zone': DateType, ! 'text': CharacterType, } values.update(additional_values) |
From: <sbi...@us...> - 2003-06-10 16:31:36
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv22685/tests Modified Files: test_Entity.py 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: test_Entity.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_Entity.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_Entity.py 10 Jan 2003 10:45:45 -0000 1.3 --- test_Entity.py 10 Jun 2003 16:31:33 -0000 1.4 *************** *** 94,101 **** --- 94,121 ---- self.failUnless(executive in emp_subentities) + class TestEntityModule(unittest.TestCase): + "-" + def test_01_externalNameForInternalName_and_inverse(self): + "[Entity module] externalNameForInternalName and inverse" + from Modeling.Entity import externalNameForInternalName, nameForExternalName + tests=(('ADDRESS', 'address'), + ('ADDRESS_BOOK', 'addressBook'), + ('DB2_ID', 'db2Id')) + + for N,n in tests: + self.failIf(externalNameForInternalName(n)!=N, + 'externalNameForInternalName(%s)!=%s'%(n,N)) + self.failIf(nameForExternalName(N)!=n, + 'nameForExternalName(%s)!=%s'%(N,n)) + self.failIf(nameForExternalName(externalNameForInternalName(n))!=n, + 'nameForExternalName(externalNameForInternalName(%s))!=%s'%(n,n)) + self.failIf(externalNameForInternalName(nameForExternalName(N))!=N, + 'nameForExternalName(externalNameForInternalName(%s))!=%s'%(N,N)) + # Build the test suite def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestEntity, "test_")) + suite.addTest(unittest.makeSuite(TestEntityModule, "test_")) return suite |
From: <sbi...@us...> - 2003-06-10 16:31:36
|
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 |
From: <sbi...@us...> - 2003-05-31 15:38:44
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv17618/DatabaseAdaptors/PostgresqlAdaptorLayer Modified Files: PostgresqlSQLExpression.py Log Message: * 'TEXT' field now accepts a width to be set (ignored when generating the database schema, but checked, if set, when validating an attribute's value) * Added 'TEXT' as a valid sql datatype for the Postgresql adaptor Index: PostgresqlSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/PostgresqlAdaptorLayer/PostgresqlSQLExpression.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PostgresqlSQLExpression.py 28 Jan 2003 18:15:34 -0000 1.1 --- PostgresqlSQLExpression.py 31 May 2003 15:11:43 -0000 1.2 *************** *** 35,38 **** --- 35,39 ---- from Modeling.SQLExpression import SQLExpression, DateType + import string class PostgresqlSQLExpression(SQLExpression): *************** *** 43,46 **** --- 44,82 ---- """ + def columnTypeStringForAttribute(self, attribute): + """ + Overrides default implementation to handle TEXT field properly. + + It returns a different string depending on some of the attribute's + properties: + + - if attribute's precision is not zero: 'externalType(precision, scale)' + + - if attribute's width is not zero and its externalType is not TEXT: + 'externalType(width)' + + - otherwise returns: 'externalType' + + About 'TEXT': a model can define a width for a TEXT field. It should be + ignored when generating the database schema (for example, TEXT(30) is an + invalid data type), however it might be set to request the validation + mechanism to check the attribute's length at runtime, typically before an + EditingContext saves its changes. + + See also: + addCreateClauseForAttribute() + SchemaGeneration.createTableStatementsForEntityGroup() + + """ + if attribute.precision(): + return attribute.externalType()+'('+\ + str(attribute.precision())+','+str(attribute.scale())+')' + if attribute.width() and attribute: + if string.lower(attribute.externalType())!='text': + return attribute.externalType()+'('+\ + str(attribute.width())+')' + + return attribute.externalType() + def valueTypeForExternalTypeMapping(self): """ *************** *** 52,55 **** --- 88,92 ---- 'timestamp without time zone': DateType, 'timestamp with time zone': DateType, + 'text', CharacterType, } *************** *** 74,77 **** --- 111,115 ---- 'timestamp without time zone': DateType, 'timestamp with time zone': DateType, + 'text', CharacterType, } values.update(additional_values) |
From: <sbi...@us...> - 2003-05-31 15:32:53
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/MySQLAdaptorLayer In directory sc8-pr-cvs1:/tmp/cvs-serv17746/DatabaseAdaptors/MySQLAdaptorLayer Modified Files: MySQLSQLExpression.py Log Message: 'TEXT' field now accepts a width to be set (ignored when generating the database schema, but checked, if set, when validating an attribute's value) Index: MySQLSQLExpression.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/MySQLAdaptorLayer/MySQLSQLExpression.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MySQLSQLExpression.py 8 Mar 2003 16:21:01 -0000 1.4 --- MySQLSQLExpression.py 31 May 2003 15:12:24 -0000 1.5 *************** *** 44,51 **** available SQL data types. """ def valueTypeForExternalTypeMapping(self): """ REMOVES 'timestamp' from the available SQL types returned by ! Modeling.SQLExpression, and adds 'datetime'. The reason for the removal of 'timestamp' is that, in MySQL, a DateTime --- 44,86 ---- available SQL data types. """ + def columnTypeStringForAttribute(self, attribute): + """ + Overrides default implementation to handle TEXT field properly. + + It returns a different string depending on some of the attribute's + properties: + + - if attribute's precision is not zero: 'externalType(precision, scale)' + + - if attribute's width is not zero and its externalType is not TEXT: + 'externalType(width)' + + - otherwise returns: 'externalType' + + About 'TEXT': a model can define a width for a TEXT field. It should be + ignored when generating the database schema (for example, TEXT(30) is an + invalid data type), however it might be set to request the validation + mechanism to check the attribute's length at runtime, typically before an + EditingContext saves its changes. + + See also: + addCreateClauseForAttribute() + SchemaGeneration.createTableStatementsForEntityGroup() + + """ + if attribute.precision(): + return attribute.externalType()+'('+\ + str(attribute.precision())+','+str(attribute.scale())+')' + if attribute.width() and attribute: + if string.lower(attribute.externalType())!='text': + return attribute.externalType()+'('+\ + str(attribute.width())+')' + + return attribute.externalType() + def valueTypeForExternalTypeMapping(self): """ REMOVES 'timestamp' from the available SQL types returned by ! Modeling.SQLExpression, and adds 'datetime' and 'text'. The reason for the removal of 'timestamp' is that, in MySQL, a DateTime |
From: <sbi...@us...> - 2003-05-31 15:19:15
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv18457 Modified Files: CHANGES Log Message: Updated Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** CHANGES 31 May 2003 10:17:18 -0000 1.105 --- CHANGES 31 May 2003 15:14:59 -0000 1.106 *************** *** 8,13 **** --- 8,23 ---- -------------------------------------------------------- + * 'TEXT' field now accepts a width to be set (ignored when generating the + database schema, but checked, if set, when validating an attribute's + value) + + * Added 'TEXT' as a valid sql datatype for the Postgresql adaptor + * Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier string definition + + * Fixed: the User's Guide as pdf failed to print for acrobat reader v4+, + because of hyperlinks. Thanks to Ernesto Revilla for reporting and + identifying the problem. 0.9-pre-8 (2003/05/27) |
From: <sbi...@us...> - 2003-05-31 15:15:12
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide In directory sc8-pr-cvs1:/tmp/cvs-serv18100/doc/UserGuide Modified Files: DefiningaModel.tex Log Message: Fixed typos and added TEXT in the list of supported sql datatypes Index: DefiningaModel.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DefiningaModel.tex 27 May 2003 19:12:18 -0000 1.9 --- DefiningaModel.tex 31 May 2003 15:13:39 -0000 1.10 *************** *** 356,360 **** identify every row of a table. It is {\bf required} that a non-abstract Entity\footnote{abstract entities are not supported yet} defines one of its ! entities to be a primary key. Within the \code{<entity>} tag you define attributes, relationships, and primary keys as well as the attributes that are ''used for locking'' (this we will not explained for now, as it --- 356,360 ---- identify every row of a table. It is {\bf required} that a non-abstract Entity\footnote{abstract entities are not supported yet} defines one of its ! attributes to be a primary key. Within the \code{<entity>} tag you define attributes, relationships, and primary keys as well as the attributes that are ''used for locking'' (this we will not explained for now, as it *************** *** 419,423 **** % \module{mxDateTime}). While this is not (yet) checked, you should keep the externalType and the python type in sync (python \code{string}: ! SQL \code{CHAR} or \code{VARCHAR}, \code{int}: SQL \code{INTEGER}, etc.) --- 419,424 ---- % \module{mxDateTime}). While this is not (yet) checked, you should keep the externalType and the python type in sync (python \code{string}: ! SQL \code{CHAR}, \code{VARCHAR} or \code{TEXT}\footnote{if you ! db-server supports \code{TEXT}}, \code{int}: SQL \code{INTEGER}, etc.) *************** *** 442,447 **** mapped. Supported SQL types are: \code{INTEGER}/\code{INT}, \code{CHAR}/\code{VARCHAR} (requires a \code{width}, see below), \code{NUMERIC} (requires \code{precision} and \code{scale}, see ! below), \code{TIMESTAMP} and \date{DATETIME}. \item[\code{precision}, \code{scale}, \code{width}:] --- 443,449 ---- mapped. Supported SQL types are: \code{INTEGER}/\code{INT}, \code{CHAR}/\code{VARCHAR} (requires a \code{width}, see below), + \code{TEXT}, \code{NUMERIC} (requires \code{precision} and \code{scale}, see ! below), \code{TIMESTAMP} and \code{DATETIME}. \item[\code{precision}, \code{scale}, \code{width}:] *************** *** 453,456 **** --- 455,475 ---- Default value: \code{'0'}. + \begin{notice} The field \code{width} is used at runtime when + validating a string attribute's value + (see~\ref{customobject-validation}, ``Validation''), before objects + are saved in the database. SQL data types \code{CHAR} and + \code{VARCHAR} require that \code{width} is specified; on the other + hand, \code{TEXT} --when supported by the database-- does not accept + that width is set. If you set it on an attribute, it will be + ignored when the database schema is generated (i.e. a \code{TEXT} + field my_text with width=30 won't be declared as \code{TEXT(30)}, + but simply as \code{TEXT}), but it will be checked at runtime and + validation for this attribute will fail if its value's length + exceeds the given width. Note that the same goal can be achieved by + writing a specific validation method for the attribute + (see~\ref{customobject-validation-by-key}). + + \end{notice} + \item[\code{defaultValue}:] use this field to assign a default value to the class' attribute. Note that this is only used when python *************** *** 563,568 **** The exact definition of to-one and to-many relationships (see~\ref{model-concepts}) are then: to-one relationship: ! \code{multiplicityUpperBound}$<=1$, to-many relationship: ! \code{multiplicityUpperBound}$>1$. \item[\code{destinationEntity}:] designates the name of the destination --- 582,587 ---- The exact definition of to-one and to-many relationships (see~\ref{model-concepts}) are then: to-one relationship: ! \code{multiplicityUpperBound<=1}, to-many relationship: ! \code{multiplicityUpperBound>1}. \item[\code{destinationEntity}:] designates the name of the destination *************** *** 978,982 **** \end{itemize} ! Running each of the above scripts with \code{--help} will give further details. --- 997,1001 ---- \end{itemize} ! Running each of the above scripts with \verb+--help+ will give further details. |
From: <sbi...@us...> - 2003-05-31 15:09:49
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv17057 Modified Files: Attribute.py Log Message: Updated docstring for validateValue() Index: Attribute.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Attribute.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Attribute.py 27 May 2003 19:37:28 -0000 1.13 --- Attribute.py 31 May 2003 15:09:46 -0000 1.14 *************** *** 468,472 **** 2. value has the same type than the attribute's one ! 3. (Not implemented yet) if attribute is constrained, the value is part of the constrained set (repeat: not implemented yet) --- 468,475 ---- 2. value has the same type than the attribute's one ! 3. if self.type() is 'string' and self.width() is set and non-zero, the ! length of 'value' should not exceeded self.width() ! ! 4. (Not implemented yet) if attribute is constrained, the value is part of the constrained set (repeat: not implemented yet) |
From: <sbi...@us...> - 2003-05-31 10:42:42
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv2361 Modified Files: Qualifier.py QualifierParser.py Log Message: Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier string definition Index: Qualifier.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Qualifier.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Qualifier.py 27 Jan 2003 22:41:59 -0000 1.5 --- Qualifier.py 31 May 2003 10:16:57 -0000 1.6 *************** *** 79,83 **** # Module def allQualifierOperators(): ! return ('==', '!=', '<', '<=', '>', '>=', 'like', 'caseInsensitiveLike') def filteredArrayWithQualifier(objects, qualifier): --- 79,83 ---- # Module def allQualifierOperators(): ! return ('==', '!=', '<', '<=', '>', '>=', 'like', 'caseInsensitiveLike', 'ilike') def filteredArrayWithQualifier(objects, qualifier): *************** *** 97,101 **** if op == '>=': return QualifierOperatorGreaterThanOrEqualTo if op == 'like': return QualifierOperatorLike ! if op in ('caseInsensitiveLike', 'iLike'): return QualifierOperatorCaseInsensitiveLike raise ValueError, aString --- 97,101 ---- if op == '>=': return QualifierOperatorGreaterThanOrEqualTo if op == 'like': return QualifierOperatorLike ! if op in ('caseInsensitiveLike', 'ilike'): return QualifierOperatorCaseInsensitiveLike raise ValueError, aString Index: QualifierParser.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/QualifierParser.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** QualifierParser.py 10 Feb 2003 11:27:10 -0000 1.7 --- QualifierParser.py 31 May 2003 10:16:57 -0000 1.8 *************** *** 176,180 **** def t_comp_op(self, s): ! r' \+ | \* | == | >= | > | <= | < | \!= | like | caseInsensitiveLike ' trace('Token COMP_OP: %s'%s) self.rv.append(Token(type=s)) --- 176,180 ---- def t_comp_op(self, s): ! r' \+ | \* | == | >= | > | <= | < | \!= | like | caseInsensitiveLike | ilike' trace('Token COMP_OP: %s'%s) self.rv.append(Token(type=s)) *************** *** 327,330 **** --- 327,331 ---- comp_op ::= like comp_op ::= caseInsensitiveLike + comp_op ::= ilike ''' trace('comp_op: %s'%args[0]) |
From: <sbi...@us...> - 2003-05-31 10:42:13
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv2572 Modified Files: CHANGES Log Message: Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier string definition Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** CHANGES 27 May 2003 19:37:28 -0000 1.104 --- CHANGES 31 May 2003 10:17:18 -0000 1.105 *************** *** 8,11 **** --- 8,14 ---- -------------------------------------------------------- + * Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier + string definition + 0.9-pre-8 (2003/05/27) --------- |
From: <sbi...@us...> - 2003-05-31 10:28:35
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv2361/tests Modified Files: test_Qualifier.py Log Message: Added keyword 'ilike', short for 'caseInsensitiveLike', for qualifier string definition Index: test_Qualifier.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_Qualifier.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_Qualifier.py 10 Feb 2003 11:51:43 -0000 1.7 --- test_Qualifier.py 31 May 2003 10:16:58 -0000 1.8 *************** *** 272,275 **** --- 272,278 ---- res=filteredArrayWithQualifier(self.authors, m_s) self.failUnless(len(res)==2 and self.jean in res and self.victor in res) + m_s=qualifierWithQualifierFormat('book.title ilike "*m?s*"') + res=filteredArrayWithQualifier(self.authors, m_s) + self.failUnless(len(res)==2 and self.jean in res and self.victor in res) # invalid expression |
From: <sbi...@us...> - 2003-05-27 20:07:55
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv11410 Modified Files: setup.py Log Message: Release 0.9-pre-8 Index: setup.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/setup.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** setup.py 6 May 2003 13:52:00 -0000 1.24 --- setup.py 27 May 2003 20:05:03 -0000 1.25 *************** *** 46,50 **** setup(name="ModelingCore", ! version="0.9-pre-7", licence ="GNU General Public License", description=short_description, --- 46,50 ---- setup(name="ModelingCore", ! version="0.9-pre-8", licence ="GNU General Public License", description=short_description, |
From: <sbi...@us...> - 2003-05-27 20:07:54
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage In directory sc8-pr-cvs1:/tmp/cvs-serv11410/Modeling/doc/HomePage Modified Files: downloads.tex main.tex Log Message: Release 0.9-pre-8 Index: downloads.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/downloads.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** downloads.tex 6 May 2003 13:52:01 -0000 1.8 --- downloads.tex 27 May 2003 20:05:02 -0000 1.9 *************** *** 10,14 **** \begin{enumerate} ! \item[\bf Current version: 0.9-pre-7] Download it here:\begin{rawhtml}<a --- 10,14 ---- \begin{enumerate} ! \item[\bf Current version: 0.9-pre-8] Download it here:\begin{rawhtml}<a Index: main.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/main.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main.tex 27 May 2003 19:03:47 -0000 1.14 --- main.tex 27 May 2003 20:05:02 -0000 1.15 *************** *** 7,11 **** % Increment the release number whenever significant changes are made. % The author and/or editor can define 'significant' however they like. ! %\release{0.9-pre-7} % At minimum, give your name and an email address. You can include a --- 7,11 ---- % Increment the release number whenever significant changes are made. % The author and/or editor can define 'significant' however they like. ! %\release{0.9-pre-8} % At minimum, give your name and an email address. You can include a *************** *** 13,17 **** \author{S\'ebastien Bigaret} \email{sbi...@us...} ! \date{May 06, 2003} %\date{\today} --- 13,17 ---- \author{S\'ebastien Bigaret} \email{sbi...@us...} ! \date{May 26, 2003} %\date{\today} |
From: <sbi...@us...> - 2003-05-27 20:05:35
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc In directory sc8-pr-cvs1:/tmp/cvs-serv11410/Modeling/doc Modified Files: UserGuide.tex Log Message: Release 0.9-pre-8 Index: UserGuide.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide.tex,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UserGuide.tex 19 May 2003 16:05:16 -0000 1.20 --- UserGuide.tex 27 May 2003 20:05:01 -0000 1.21 *************** *** 12,20 **** % the rest is at your discretion. \authoraddress{Email: \email{sbi...@us...}} ! \date{May 06, 2003} %\date{\today} ! \release{0.9-pre-7} ! %\setreleaseinfo{pre-7} \setshortversion{0.9} \makeindex --- 12,29 ---- % the rest is at your discretion. \authoraddress{Email: \email{sbi...@us...}} ! \date{May 27, 2003} %\date{\today} ! \release{0.9-pre-8} ! %\setreleaseinfo{pre-8} \setshortversion{0.9} + + % Here we want to redefine \url and \ulink since Acrobat Reader v5+ + % is not able to print the document correctly when a link is inserted + % Dunno why (even if it seems that option 'Print as Image' works) + %begin{latexonly} + \renewcommand{\ulink}[2]{#1 (at #2)} + \renewcommand{\url}[1]{#1} + % we do not redefine \citetitle, it uses \ulink + %end{latexonly} \makeindex |
From: <sbi...@us...> - 2003-05-27 19:49:21
|
Update of /cvsroot/modeling/ZModeling/ZModelizationTool/dtml In directory sc8-pr-cvs1:/tmp/cvs-serv4596/ZModelizationTool/dtml Modified Files: model_properties.dtml Log Message: Updated the ZModeler: now includes the "base" mode for python code. Plus it also introduces the 'dry-run' mode (show what would be generated/overwritten without making any changes on the filesystem). Index: model_properties.dtml =================================================================== RCS file: /cvsroot/modeling/ZModeling/ZModelizationTool/dtml/model_properties.dtml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** model_properties.dtml 22 Apr 2003 09:35:23 -0000 1.8 --- model_properties.dtml 27 May 2003 19:49:17 -0000 1.9 *************** *** 202,221 **** <hr noshade> <br> ! <h3>Building the model</h3> - <h4>Python code</h4> <form action="manage_build" method="post"> ! This will write the «skeleton»-package for the current model: ! initialization code, modules & model. <p> <table width="100%"><tr><td> <b> ! <font color="#FF0000" valign=middle size="+1">!!! WARNING!!!</font> </b></td> ! <td> This will <b>permanently</b> erase all changes you might have done in ! the corresponding directory/package!<br> ! <u>Please consider making backups of your work before proceeding!</u> </td></tr></table> --- 202,235 ---- <hr noshade> <br> ! <h3>Generating python code</h3> <form action="manage_build" method="post"> ! Two different kind of python package can be generated:<ul> ! <li/> "compact": puts all generated file in the same directory (the package ! for the model). When re-generating the files, only the two files ! containing the model are overwritten, every other file that already exists ! is never overwritten ! ! <li/> "base": adds a sub-module 'MDL' within the generated package. All files ! within MDL/ are ALWAYS overwritten when the python code is regenerated, ! while others (in the root package) are never overwritten if they exist. ! This is probably the one you want to use if your model changes often. ! ! Note: this can be used if and only if there is no entity sharing the same ! module with one of its (direct or indirect) subentities. If this is ! not the case, the generation will raise and indicate the problem. ! ! </ul> <p> <table width="100%"><tr><td> <b> ! <font color="#FF0000" valign=middle size="+1">Attention!</font> </b></td> ! <td> To avoid overwriting valuable files, make sure the ! <b><i>dry-run</i></b> checkbox below is checked: you'll get a complete ! overview of which files would be generated/overwritten by the generation ! process with the insurance that none of them are actually changed. </td></tr></table> *************** *** 227,234 **** <td valign=top>Generate templates for: </td> <td valign=top> ! <input type="radio" name="typeOfCode" value="python" checked>python ! <!-- <input type="radio" name="typeOfCode" value="CMF">CMF--> </td> </tr> <tr> <td valign=top>rootPath</td> --- 241,251 ---- <td valign=top>Generate templates for: </td> <td valign=top> ! <input type="radio" name="generation_scheme" value="compact" checked>python / ''compact'' mode<br> ! <input type="radio" name="generation_scheme" value="base">python / ''base'' mode </td> </tr> + <tr><td>Dry run:</td> + <td><input type="checkbox" value="1" name="fake_mode" checked/> do not create or change any file, just report what would be done</td> + </tr> <tr> <td valign=top>rootPath</td> *************** *** 238,241 **** --- 255,262 ---- <input type="submit" value="Build skeletons! (Please read the notice above carefully)"> </td> + </tr><tr> + <td colspan=2 align=left>Note: this can also be done with script + <code>mdl_generate_python_code.py</code> (<code>--help</code> for + details)</td> </tr> </table> *************** *** 244,248 **** <hr noshade> ! <h3>Database schema</h3> <form action="&dtml-absolute_url;" method="POST"> --- 265,269 ---- <hr noshade> ! <h3>Generating the database schema</h4> <form action="&dtml-absolute_url;" method="POST"> *************** *** 305,311 **** <underline>NB: </underline>the 'Show me the SQL statements' button will not show the DROP/CREATE DATABASE statements. ! </p> </center> </form> --- 326,334 ---- <underline>NB: </underline>the 'Show me the SQL statements' button will not show the DROP/CREATE DATABASE statements. ! <br> </p> </center> + Note: this can also be done with script + <code>mdl_generate_DB_schema.py</code> (<code>--help</code> for details) </form> |
From: <sbi...@us...> - 2003-05-27 19:49:20
|
Update of /cvsroot/modeling/ZModeling/ZModelizationTool In directory sc8-pr-cvs1:/tmp/cvs-serv4596/ZModelizationTool Modified Files: ZModelizationTool.py Log Message: Updated the ZModeler: now includes the "base" mode for python code. Plus it also introduces the 'dry-run' mode (show what would be generated/overwritten without making any changes on the filesystem). Index: ZModelizationTool.py =================================================================== RCS file: /cvsroot/modeling/ZModeling/ZModelizationTool/ZModelizationTool.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ZModelizationTool.py 22 Apr 2003 09:35:16 -0000 1.12 --- ZModelizationTool.py 27 May 2003 19:49:17 -0000 1.13 *************** *** 715,720 **** return self.manage_entityProperties(REQUEST, manage_tabs_message="Relationship's properties changed") ! def manage_build(self, modelName, rootPath=None, typeOfCode='python', ! REQUEST=None): "Builds the python-code templates for the supplied model" if not rootPath: --- 715,720 ---- return self.manage_entityProperties(REQUEST, manage_tabs_message="Relationship's properties changed") ! def manage_build(self, modelName, rootPath=None, generation_scheme='compact', ! fake_mode=0, REQUEST=None): "Builds the python-code templates for the supplied model" if not rootPath: *************** *** 724,737 **** message=msg, action="./manage_modelProperties") ! ! if typeOfCode=='python': ! from Modeling.ModelMasons.PyModelMason import PyModelMason ! mason = PyModelMason(self.modelNamed(modelName), rootPath) mason.build() if REQUEST is not None: ! return self.manage_modelProperties( ! REQUEST, ! manage_tabs_message='Building of code finished.', ! modelName=modelName) def __call__(self): --- 724,748 ---- message=msg, action="./manage_modelProperties") ! ! from Modeling.ModelMasons.PyModelMason import PyModelMason ! mason = PyModelMason(self.modelNamed(modelName), rootPath, ! verbose_mode=1, generation_scheme=generation_scheme, ! fake_mode=fake_mode) ! from cStringIO import StringIO ! s=StringIO() ! mason.log=s.write mason.build() + + #msg=s.getvalue() + msg='<input type="hidden" name="modelName" value="%s">'%modelName + msg+='<table width="100%">' + if fake_mode: + msg+='<tr><td><b><u>Dry-run:</u> files have not been generated</b></i></td></tr>' + msg+='<tr><td align=left><pre>'+s.getvalue() + msg+='</pre></td></tr></table>' + if REQUEST is not None: ! return MessageDialog(title='Python code generation', message=msg, ! action="./manage_modelProperties") def __call__(self): |
From: <sbi...@us...> - 2003-05-27 19:49:20
|
Update of /cvsroot/modeling/ZModeling In directory sc8-pr-cvs1:/tmp/cvs-serv4596 Modified Files: CHANGES Log Message: Updated the ZModeler: now includes the "base" mode for python code. Plus it also introduces the 'dry-run' mode (show what would be generated/overwritten without making any changes on the filesystem). Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ZModeling/CHANGES,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** CHANGES 6 May 2003 16:29:48 -0000 1.17 --- CHANGES 27 May 2003 19:49:16 -0000 1.18 *************** *** 1,5 **** -*- text -*- ! Current release is: 0.9-pre-7 0.9-pre-7 (2003/05/06) --- 1,12 ---- -*- text -*- ! Current release is: 0.9-pre-8 ! ! 0.9-pre-8 (2003/05/27) ! --------- ! ! * Updated the ZModeler: now includes the "base" mode for python code. Plus ! it also introduces the 'dry-run' mode (show what would be ! generated/overwritten without making any changes on the filesystem). 0.9-pre-7 (2003/05/06) |
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv30996 Modified Files: Attribute.py Entity.py Model.py ModelSet.py Relationship.py XMLutils.py CHANGES Log Message: Loading a xml-model is now 5 to 6x faster: applied a patch submitted by Yannick Gingras <ygi...@yg...>. Thanks! This was done by replacing Sax2.Reader().fromStream() with xml.dom.minidom.parseString(), and by removing most of the xpath.Evaluate() Index: Attribute.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Attribute.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Attribute.py 22 Apr 2003 09:31:56 -0000 1.12 --- Attribute.py 27 May 2003 19:37:28 -0000 1.13 *************** *** 533,554 **** """ ! _attrDict=self.xmlAttributesDict() ! _attrNode=aNode.attributes ! attributes=[attr.name for attr in aNode.attributes] ! # Now we must make sure that the type is initialized BEFORE the default # value is set --> we simply make sure that this will be the first one # to be initialized try: ! t=[a for a in attributes if a=='type'][0] #IndexError ! attributes.remove(t) ! attributes=[t]+attributes except IndexError: pass ! for attributeName in attributes: # Iterate on attributes declared in node attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) - value=xpath.Evaluate(attrType+'(@'+attributeName+')', contextNode=aNode) if attrType=='string': value=unicodeToStr(value, encoding) set(value) --- 533,550 ---- """ ! k_v=aNode.attributes.items() # Now we must make sure that the type is initialized BEFORE the default # value is set --> we simply make sure that this will be the first one # to be initialized try: ! t=[a for a in k_v if a[0]=='type'][0] #IndexError ! k_v.remove(t) ! k_v=[t]+k_v except IndexError: pass ! for attributeName, value in k_v: # Iterate on attributes declared in node attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) set(value) Index: Entity.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Entity.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Entity.py 22 Apr 2003 09:31:56 -0000 1.11 --- Entity.py 27 May 2003 19:37:28 -0000 1.12 *************** *** 1259,1269 **** if phase not in (1,2): raise ValueError, 'Ooops, parameter phase should be 1 or 2!' ! _attrDict=self.xmlAttributesDict() ! _attrNode=aNode.attributes ! for attributeName in [attr.name for attr in aNode.attributes]: # Iterate on attributes which are in the xml attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) - value=xpath.Evaluate(attrType+'(@'+attributeName+')', contextNode=aNode) if attrType=='string': value=unicodeToStr(value, encoding) set(value) --- 1259,1268 ---- if phase not in (1,2): raise ValueError, 'Ooops, parameter phase should be 1 or 2!' ! ! k_v=aNode.attributes.items() ! for attributeName, value in k_v: # Iterate on attributes which are in the xml attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) set(value) Index: Model.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Model.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Model.py 22 Apr 2003 09:31:56 -0000 1.4 --- Model.py 27 May 2003 19:37:28 -0000 1.5 *************** *** 241,250 **** if self.entities(): raise XMLImportError, "Cannot initialize a non-empty model" ! _attrDict=self.xmlAttributesDict() ! _attrNode=aNode.attributes ! for attributeName in [attr.name for attr in aNode.attributes]: attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) - value=xpath.Evaluate(attrType+'(@'+attributeName+')', contextNode=aNode) if attrType=='string': value=unicodeToStr(value, encoding) set(value) --- 241,249 ---- if self.entities(): raise XMLImportError, "Cannot initialize a non-empty model" ! ! k_v=aNode.attributes.items() ! for attributeName, value in k_v: attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) set(value) Index: ModelSet.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/ModelSet.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ModelSet.py 7 May 2003 11:28:45 -0000 1.7 --- ModelSet.py 27 May 2003 19:37:28 -0000 1.8 *************** *** 55,58 **** --- 55,59 ---- import ClassDescription import types + from xml.dom.minidom import parseString from logging import error, warn *************** *** 221,232 **** if xmlSource.has_key('string'): encoding=autoDetectXMLEncoding(xmlSource['string']) ! reader=Sax2.Reader() ! xmldoc=reader.fromString(xmlSource['string']) elif xmlSource.has_key('file'): f=open(xmlSource['file'], 'rb') encoding=autoDetectXMLEncoding(f.read()) f.close() ! reader=Sax2.Reader() ! xmldoc=reader.fromStream(xmlSource['file']) else: raise AttributeError, "xmlSource parameter has no key 'string' or 'file'" --- 222,231 ---- if xmlSource.has_key('string'): encoding=autoDetectXMLEncoding(xmlSource['string']) ! xmldoc=parseString(xmlSource['string']) elif xmlSource.has_key('file'): f=open(xmlSource['file'], 'rb') encoding=autoDetectXMLEncoding(f.read()) f.close() ! xmldoc=parseString(open(xmlSource['file']).read()) else: raise AttributeError, "xmlSource parameter has no key 'string' or 'file'" Index: Relationship.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Relationship.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Relationship.py 22 Apr 2003 09:31:56 -0000 1.8 --- Relationship.py 27 May 2003 19:37:28 -0000 1.9 *************** *** 243,254 **** Initializes a relationship with the supplied xml.dom.node. """ ! _attrDict=self.xmlAttributesDict() ! _attrNode=aNode.attributes ! for attributeName in [attr.name for attr in aNode.attributes]: # Iterate on attributes declared in node attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) - value=xpath.Evaluate(attrType+'(@'+attributeName+')', contextNode=aNode) if attrType=='string': value=unicodeToStr(value, encoding) set(value) --- 243,253 ---- Initializes a relationship with the supplied xml.dom.node. """ ! k_v=aNode.attributes.items() ! for attributeName, value in k_v: # Iterate on attributes declared in node attrType=self.xmlAttributeType(attributeName) set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) + if attrType=='number': value=int(value) set(value) Index: XMLutils.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/XMLutils.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XMLutils.py 14 Mar 2003 11:40:10 -0000 1.3 --- XMLutils.py 27 May 2003 19:37:28 -0000 1.4 *************** *** 51,62 **** try: - from xml.dom.ext.reader import Sax2 - from xml.dom.ext.reader.Sax import FromXmlStream - except: - raise 'ImportError', 'PyXML is not installed' - try: from xml import xpath except: ! raise 'ImportError', 'XPath is not installed' import codecs, encodings --- 51,57 ---- try: from xml import xpath except: ! raise 'ImportError', 'PyXML is not installed: failed to import xml.xpath' import codecs, encodings Index: CHANGES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** CHANGES 26 May 2003 15:44:47 -0000 1.103 --- CHANGES 27 May 2003 19:37:28 -0000 1.104 *************** *** 3,11 **** Module Modeling --------------- ! Current release is: 0.9-pre-7 / See also: TODO, INSTALL and doc/ * ** Distributed under the GNU General Public License ** -------------------------------------------------------- [Merged from brch-0_9pre6-1-ModelMasons_base_generation_scheme] --- 3,20 ---- Module Modeling --------------- ! Current release is: 0.9-pre-8 / See also: TODO, INSTALL and doc/ * ** Distributed under the GNU General Public License ** -------------------------------------------------------- + 0.9-pre-8 (2003/05/27) + --------- + + * Loading a xml-model is now 5 to 6x faster: applied a patch submitted by + Yannick Gingras <ygi...@yg...>. Thanks! + + * Fixed: creating/dropping a database could fail because of trying to + rollback a cursor in autocommit mode + [Merged from brch-0_9pre6-1-ModelMasons_base_generation_scheme] *************** *** 33,37 **** * Added the 'MDL' sub-directory containing the files that are overwritten when mdl_generate_python_code.py (option: -B) regenerates a package ! [/merged] * RFE #726839: Added environment variable MDL_DB_CONNECTIONS_CFG; it points --- 42,46 ---- * Added the 'MDL' sub-directory containing the files that are overwritten when mdl_generate_python_code.py (option: -B) regenerates a package ! [/merge] * RFE #726839: Added environment variable MDL_DB_CONNECTIONS_CFG; it points |
From: <sbi...@us...> - 2003-05-27 19:12:21
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide In directory sc8-pr-cvs1:/tmp/cvs-serv21722/doc/UserGuide Modified Files: DefiningaModel.tex Log Message: Fixed a latex issue with tilda Index: DefiningaModel.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefiningaModel.tex 19 May 2003 16:05:16 -0000 1.8 --- DefiningaModel.tex 27 May 2003 19:12:18 -0000 1.9 *************** *** 9,13 **** active, even if it was initiated by M. Peter P. Chen in 1976 (one of the most cited paper in computer science (rank 36), see ! \ulink{here}{http://bit.csc.lsu.edu/\tilde{}chen/display.html} ). Some other references can be found at the end of this chapter. --- 9,13 ---- active, even if it was initiated by M. Peter P. Chen in 1976 (one of the most cited paper in computer science (rank 36), see ! \ulink{here}{http://bit.csc.lsu.edu/\~{}chen/display.html} ). Some other references can be found at the end of this chapter. *************** *** 986,990 **** \begin{itemize} ! \item{} Peter P. Chen, 1976 -- see. http://bit.csc.lsu.edu/~chen/display.html --- 986,990 ---- \begin{itemize} ! \item{} Peter P. Chen, 1976 -- see. http://bit.csc.lsu.edu/\~{}chen/display.html |
From: <sbi...@us...> - 2003-05-27 19:04:47
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv18393 Modified Files: DEPENDENCIES Log Message: Refreshed the dependencies ; removed 4Suite Index: DEPENDENCIES =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/DEPENDENCIES,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DEPENDENCIES 2 Mar 2003 14:55:55 -0000 1.8 --- DEPENDENCIES 27 May 2003 19:04:45 -0000 1.9 *************** *** 1,3 **** ! Tested for: python v2.1 & 2.2.1 DEPENDENCIES --- 1,3 ---- ! Tested for: python v2.1 & 2.2.2 DEPENDENCIES *************** *** 6,10 **** The following extra-packages are required: ! * NotificationFramework v0.4 * For code/GUI templates generation: --- 6,10 ---- The following extra-packages are required: ! * NotificationFramework v0.5 * For code/GUI templates generation: *************** *** 18,24 **** currently v0.8 - - 4suite ftp://ftp.fourthought.com/pub/4Suite/ - currently v0.12a2 - * mxDateTime: egenix-mxDateTime in BASE package, v2.0.4 --- 18,21 ---- *************** *** 26,37 **** * For DatabaseAdaptors.PostgresqlAdaptorLayer ! - psycopg v1.0.15.1 -- http://initd.org/software/psycopg ! - Or pgdb (debian module python2.1-pygresql v7.2.1-2 ) Source: ftp://ftp.druid.net/pub/distrib/PyGreSQL-3.3-pre011203.tgz ! - Or PyGreSQL v2.3 -- http://pypgsql.sourceforge.net/ For more details on python-db adaptors, please refer to --- 23,36 ---- * For DatabaseAdaptors.PostgresqlAdaptorLayer + + (postgresql servers v7.2 and 7.3 are supported) ! - psycopg v1.1.4 -- http://initd.org/software/psycopg ! - Or pgdb v3.3 (debian module python2.1-pygresql v7.2.1-2 ) Source: ftp://ftp.druid.net/pub/distrib/PyGreSQL-3.3-pre011203.tgz ! - Or PyPgSQL v2.3 -- http://pypgsql.sourceforge.net/ For more details on python-db adaptors, please refer to *************** *** 45,49 **** * For the QualifierParser (supporting Qualifier.qualifierWithQualifierFormat) ! - "spark v0.6.1":http://pages.cpsc.ucalgary.ca/~aycock/spark/ Important: do NOT install v0.7+, it will not work see also: INSTALL --- 44,48 ---- * For the QualifierParser (supporting Qualifier.qualifierWithQualifierFormat) ! - "spark v0.6.1": http://pages.cpsc.ucalgary.ca/~aycock/spark/ Important: do NOT install v0.7+, it will not work see also: INSTALL |