[fdo-commits] r659 - in trunk/Providers/GenericRdbms: Src/MySQL/SchemaMgr/Ph Src/ODBC/SchemaMgr/Ph Src/SchemaMgr/Ph com

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Jan 22 13:46:18 EST 2007


Author: barbarazoladek
Date: 2007-01-22 13:46:16 -0500 (Mon, 22 Jan 2007)
New Revision: 659

Modified:
   trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.cpp
   trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.h
   trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.cpp
   trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.h
   trunk/Providers/GenericRdbms/Src/SchemaMgr/Ph/Owner.cpp
   trunk/Providers/GenericRdbms/com/fdo_sys.sql
Log:
FDO316 Merge from branch 3.2

Modified: trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.cpp	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.cpp	2007-01-22 18:46:16 UTC (rev 659)
@@ -639,3 +639,75 @@
 	else
 		return L"schemaname != database()";
 }
+void FdoSmPhMySqlOwner::CreateMetaClass()
+{
+	FdoSmPhMySqlMgrP mgr = GetManager()->SmartCast<FdoSmPhMySqlMgr>();
+    GdbiConnection* gdbiConn = mgr->GetGdbiConnection();
+	FdoStringP sql_stmt;
+
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname,schemaname,tablename,classtype,description,isabstract,parentclassname,istablecreator, isfixedtable, hasversion, haslock) "
+			L"values ('Class', 'F_MetaClass', ' ', 1, '%ls', 0, 'ClassDefinition', 0, 1, 0, 0)",
+			NlsMsgGet(FDORDBMS_504, "Non-feature metaclass"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) "
+			L"values ('ClassDefinition', 'F_MetaClass', 'f_classdefinition', 1, '%ls', 1, null, 0, 1, 0, 0) ",
+			NlsMsgGet(FDORDBMS_496, "Base for all metaclasses")); 
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, "
+			L"isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) "
+			L"values('f_classdefinition', LAST_INSERT_ID(), 'classname', 'ClassName', 'CHAR', 30, 0, 'string', 0, 0, 1, 1, 0, 0,"
+			L"substring_index(current_user(), _utf8'@', 1), '%ls', 0, 1)",
+			NlsMsgGet(FDORDBMS_497, "FDO base property: object class name"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, "
+			L"isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) "
+			L"values('f_classdefinition', LAST_INSERT_ID(), 'schemaname', 'SchemaName', 'CHAR', 255, 0, 'string', 1, 0, 1, 1, 0, 0,"
+			L"substring_index(current_user(), _utf8'@', 1), '%ls', 0, 1)",
+			NlsMsgGet(FDORDBMS_498, "FDO base property: object class schema name"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname,schemaname,tablename,classtype,description,isabstract,parentclassname,istablecreator,isfixedtable,hasversion,haslock) "
+			L"values ('Feature','F_MetaClass','f_feature',1,'%ls',0,'ClassDefinition',0,1,0,0)",
+			NlsMsgGet(FDORDBMS_499, "Feature metaclass"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition  "
+			L"(tablename,classid,columnname,attributename,idposition,columntype,columnsize,columnscale,attributetype,"
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn)  "
+			L"values ('f_feature',LAST_INSERT_ID(),'featid','FeatId',1,'BIGINT',0,0,'int64',0,1,1,1,1,0, "
+			L"substring_index(current_user(), _utf8'@',1),'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_500, "Feature id number (uniquely identifies a feature)"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,idposition,columntype,columnsize,columnscale,attributetype, "
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('f_feature',LAST_INSERT_ID(),'classid','ClassId',1,'BIGINT',0,0,'int64',0,0,1,1,1,0, "
+			L"substring_index(current_user(), _utf8'@',1),'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_501, "Class id number (uniquely identifies a class)"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,columntype,columnsize,columnscale,attributetype, "
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('f_feature',LAST_INSERT_ID(),'revisionnumber','RevisionNumber','BIGINT',0,0,'double',0,0,1,1,1,1, "
+			L"substring_index(current_user(), _utf8'@',1),'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_502, "Edit count for supporting optimistic locking.  This value is incremented everytime the object is updated."));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,columntype,columnsize,columnscale,attributetype,geometrytype,isnullable, "
+			L"isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('n/a',LAST_INSERT_ID(),'n/a','Bounds','GEOMETRY',0,0,'4','84224',1,0,1,1,0,0, "
+			L"substring_index(current_user(), _utf8'@',1),'%ls', 0, 0)",
+			NlsMsgGet(FDORDBMS_503, "Bounding box for the feature"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+}
\ No newline at end of file

Modified: trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.h	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Owner.h	2007-01-22 18:46:16 UTC (rev 659)
@@ -83,6 +83,9 @@
     void DropTablesTable();
     void DropColumnsTable();
 
+	// Create Meta class 
+	void CreateMetaClass();
+
 	// Get the function name that returns the datastore name from the server
 	FdoString* GetDbNameClause(bool isEqual);
 

Modified: trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.cpp	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.cpp	2007-01-22 18:46:16 UTC (rev 659)
@@ -247,4 +247,76 @@
 												GetName());
 	return (FdoString*) schemaCond;
 }
+void FdoSmPhOdbcOwner::CreateMetaClass()
+{
+	FdoSmPhOdbcMgrP mgr = GetManager()->SmartCast<FdoSmPhOdbcMgr>();
+    GdbiConnection* gdbiConn = mgr->GetGdbiConnection();
+	FdoStringP sql_stmt;
 
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname,schemaname,tablename,classtype,description,isabstract,parentclassname,istablecreator,isfixedtable,hasversion,haslock) "
+			L"values ('Class', 'F_MetaClass', ' ', 1, '%ls', 0, 'ClassDefinition', 0, 1, 0, 0)",
+			NlsMsgGet(FDORDBMS_504, "Non-feature metaclass"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt); 
+
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) "
+			L"values('ClassDefinition', 'F_MetaClass', 'f_classdefinition', 1, '%ls', 1, null, 0, 1, 0, 0)",
+			NlsMsgGet(FDORDBMS_496, "Base for all metaclasses")); 
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable,"
+			L"isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) "
+			L"values ('f_classdefinition', IDENT_CURRENT('f_classdefinition'), 'classname', 'ClassName', 'CHAR', 30, 0, 'string', 0, 0, 1, 1, 0, 0,"
+			L"SYSTEM_USER, '%ls', 0, 1)",
+			NlsMsgGet(FDORDBMS_497, "FDO base property: object class name"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable,"
+			L"isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) "
+			L"values ('f_classdefinition', IDENT_CURRENT('f_classdefinition'), 'schemaname', 'SchemaName', 'CHAR', 255, 0, 'string', 1, 0, 1, 1, 0, 0,"
+			L"SYSTEM_USER, '%ls', 0, 1)",
+			NlsMsgGet(FDORDBMS_498, "FDO base property: object class schema name"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_classdefinition "
+			L"(classname,schemaname,tablename,classtype,description,isabstract,parentclassname,istablecreator,isfixedtable,hasversion,haslock) "
+			L"values ('Feature','F_MetaClass','f_feature',1,'%ls',0,'ClassDefinition',0,1,0,0)",
+			NlsMsgGet(FDORDBMS_499, "Feature metaclass"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition  "
+			L"(tablename,classid,columnname,attributename,idposition,columntype,columnsize,columnscale,attributetype,"
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn)  "
+			L"values ('f_feature',IDENT_CURRENT('f_classdefinition'),'featid','FeatId',1,'NUMBER',20,0,'int64',0,1,1,1,1,0, "
+			L"SYSTEM_USER,'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_500, "Feature id number (uniquely identifies a feature)"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,idposition,columntype,columnsize,columnscale,attributetype, "
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('f_feature',IDENT_CURRENT('f_classdefinition'),'classid','ClassId',1,'NUMBER',20,0,'int64',0,0,1,1,1,0, "
+			L"SYSTEM_USER,'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_501, "Class id number (uniquely identifies a class)"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,columntype,columnsize,columnscale,attributetype, "
+			L"isnullable,isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('f_feature',IDENT_CURRENT('f_classdefinition'),'revisionnumber','RevisionNumber','NUMBER',0,0,'double',0,0,1,1,1,1, "
+			L"SYSTEM_USER,'%ls',0,1)",
+			NlsMsgGet(FDORDBMS_502, "Edit count for supporting optimistic locking.  This value is incremented everytime the object is updated."));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+
+	sql_stmt = FdoStringP::Format(L"insert into f_attributedefinition "
+			L"(tablename,classid,columnname,attributename,columntype,columnsize,columnscale,attributetype,geometrytype,isnullable, "
+			L"isfeatid,issystem,isreadonly,isautogenerated,isrevisionnumber,owner,description,iscolumncreator,isfixedcolumn) "
+			L"values ('n/a',IDENT_CURRENT('f_classdefinition'),'n/a','Bounds','GEOMETRY',0,0,'4','84224',1,0,1,1,0,0, "
+			L"SYSTEM_USER,'%ls',0,0)",
+			NlsMsgGet(FDORDBMS_503, "Bounding box for the feature"));
+	gdbiConn->ExecuteNonQuery( (const char*) sql_stmt);
+}
+

Modified: trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.h	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/Src/ODBC/SchemaMgr/Ph/Owner.h	2007-01-22 18:46:16 UTC (rev 659)
@@ -44,6 +44,7 @@
     ~FdoSmPhOdbcOwner(void);
 	// Get the schema name
 	FdoString* GetDbNameClause(bool isEqual);
+	void CreateMetaClass();
 
     // Make this owner the current schema
     virtual void SetCurrent();

Modified: trunk/Providers/GenericRdbms/Src/SchemaMgr/Ph/Owner.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/SchemaMgr/Ph/Owner.cpp	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/Src/SchemaMgr/Ph/Owner.cpp	2007-01-22 18:46:16 UTC (rev 659)
@@ -43,7 +43,7 @@
 	else	{
 		mgr->ExecSchemaFile( L"fdo_sys.sql", keywords );
 		mgr->ExecSchemaFile( L"fdo_sys_idx.sql", keywords );
-
+		CreateMetaClass();
         FdoStringP sqlStmt = FdoStringP::Format(
             L"update f_schemainfo set description = '%ls' where upper(schemaname) = '%ls'",
             GetDescription(),

Modified: trunk/Providers/GenericRdbms/com/fdo_sys.sql
===================================================================
--- trunk/Providers/GenericRdbms/com/fdo_sys.sql	2007-01-22 17:45:43 UTC (rev 658)
+++ trunk/Providers/GenericRdbms/com/fdo_sys.sql	2007-01-22 18:46:16 UTC (rev 659)
@@ -310,27 +310,6 @@
 #endif
 ;
 
-/* Insert here only classes that do not require any data in the F_AttributeDefinition table */
-
-#ifdef Oracle
-insert into f_classdefinition 
-(classid, classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-(F_ClassSeq.nextval, 'Class', 'F_MetaClass', ' ', 1, 'Non-feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-#endif
-
-#ifdef MySQL
-insert into f_classdefinition 
-( classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('Class', 'F_MetaClass', ' ', 1, 'Non-feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-#endif
-
-#ifdef SQLServer
-SET IDENTITY_INSERT f_classdefinition ON;
-insert into f_classdefinition 
-(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('Class', 'F_MetaClass', ' ', 1, 'Non-feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-#endif
-
 create table f_attributedefinition  (
 #ifdef Oracle
     tablename       varchar(30) not null,
@@ -404,66 +383,9 @@
 ;
 #endif
 
-/* Add new meta-classes here and insert base properties */
-/* Use F_ClassSeq.nextval for the classid inserting into the F_ClassDefinition table and F_ClassSeq.Currval for inserting */
-/* properties into the F_AttributeDefinition table */
 
-
-#ifdef Oracle
-/* Base properties common to all classes */
-insert into f_classdefinition 
-(classid, classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-(F_ClassSeq.nextval, 'ClassDefinition', 'F_MetaClass', 'F_CLASSDEFINITION', 1, 'Base for all metaclasses', 1, null, 0, 1, 0, 0); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('F_CLASSDEFINITION', F_ClassSeq.currval, 'CLASSNAME', 'ClassName', 'CHAR', 30, 0, 'string', 0, 0, 1, 1, 0, 0,
-sys_context('userenv', 'current_schema'), 'FDO base property: object class name', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('F_CLASSDEFINITION', F_ClassSeq.currval, 'SCHEMANAME', 'SchemaName', 'CHAR', 255, 0, 'string', 1, 0, 1, 1, 0, 0,
-sys_context('userenv', 'current_schema'), 'FDO base property: object class schema name', 0, 1);
-
-#endif
-
-#ifdef MySQL
-insert into f_classdefinition 
-(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('ClassDefinition', 'F_MetaClass', 'f_classdefinition', 1, 'Base for all metaclasses', 1, null, 0, 1, 0, 0); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_classdefinition', LAST_INSERT_ID(), 'classname', 'ClassName', 'CHAR', 30, 0, 'string', 0, 0, 1, 1, 0, 0,
-substring_index(current_user(), _utf8'@', 1), 'FDO base property: object class name', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_classdefinition', LAST_INSERT_ID(), 'schemaname', 'SchemaName', 'CHAR', 255, 0, 'string', 1, 0, 1, 1, 0, 0,
-substring_index(current_user(), _utf8'@', 1), 'FDO base property: object class schema name', 0, 1);
-#endif
-
 #ifdef SQLServer 
-insert into f_classdefinition 
-(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('ClassDefinition', 'F_MetaClass', 'f_classdefinition', 1, 'Base for all metaclasses', 1, null, 0, 1, 0, 0); 
 
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_classdefinition', IDENT_CURRENT('f_classdefinition'), 'classname', 'ClassName', 'CHAR', 30, 0, 'string', 0, 0, 1, 1, 0, 0,
-SYSTEM_USER, 'FDO base property: object class name', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_classdefinition', IDENT_CURRENT('f_classdefinition'), 'schemaname', 'SchemaName', 'CHAR', 255, 0, 'string', 1, 0, 1, 1, 0, 0,
-SYSTEM_USER, 'FDO base property: object class schema name', 0, 1);
-
 #ifdef FdoLt
 insert into f_attributedefinition
 (tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
@@ -494,107 +416,6 @@
 
 #endif
 
-
-/* Base properties common to all feature classes. Although most of these belong on the F_Feature table, 
-/* the Schema Manager will move them to each class table when using flexible schema (no F_Feature table) */
-
-#ifdef Oracle
-insert into f_classdefinition 
-(classid, classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-(F_ClassSeq.nextval, 'Feature', 'F_MetaClass', 'F_FEATURE', 1, 'Feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('F_FEATURE', F_ClassSeq.currval, 'FEATID', 'FeatId', 1, 'NUMBER', 20, 0, 'int64', 0, 1, 1, 1, 1, 0,
-sys_context('userenv', 'current_schema'), 'Feature id number (uniquely identifies a feature)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('F_FEATURE', F_ClassSeq.currval, 'CLASSID', 'ClassId', 1, 'NUMBER', 20, 0, 'int64', 0, 0, 1, 1, 1, 0,
-sys_context('userenv', 'current_schema'), 'Class id number (uniquely identifies a class)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('F_FEATURE', F_ClassSeq.currval, 'REVISIONNUMBER', 'RevisionNumber', 'NUMBER', 0, 0, 'double', 0, 0, 1, 1, 1, 1,
-sys_context('userenv', 'current_schema'), 'Edit count for supporting optimistic locking.  This value is incremented everytime the object is updated.',
-0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, geometrytype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('n/a', F_ClassSeq.currval, 'n/a', 'Bounds', 'GEOMETRY', 0, 0, '4', '84224', 1, 0, 1, 1, 0, 0,
-sys_context('userenv', 'current_schema'), 'Bounding box for the feature', 0, 0);
-
-#endif
-
-#ifdef MySQL 
-insert into f_classdefinition 
-(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('Feature', 'F_MetaClass', 'f_feature', 1, 'Feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', LAST_INSERT_ID(), 'featid', 'FeatId', 1, 'BIGINT', 0, 0, 'int64', 0, 1, 1, 1, 1, 0,
-substring_index(current_user(), _utf8'@', 1), 'Feature id number (uniquely identifies a feature)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', LAST_INSERT_ID(), 'revisionnumber', 'RevisionNumber', 'NUMERIC', 0, 0, 'double', 0, 0, 1, 1, 1, 1,
-substring_index(current_user(), _utf8'@', 1), 'Edit count for supporting optimistic locking.  This value is incremented everytime the object is updated.',
-0, 1); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', LAST_INSERT_ID(), 'classid', 'ClassId', 1, 'BIGINT', 0, 0, 'int64', 0, 0, 1, 1, 1, 0,
-substring_index(current_user(), _utf8'@', 1), 'Class id number (uniquely identifies a class)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, geometrytype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('n/a', LAST_INSERT_ID(), 'n/a', 'Bounds', 'GEOMETRY', 0, 0, '4', '84224', 1, 0, 1, 1, 0, 0, substring_index(current_user(), _utf8'@', 1), 'Bounding box for the feature', 0, 0);
-
-#endif
-
-
-#ifdef SQLServer
-insert into f_classdefinition 
-(classname, schemaname, tablename,classtype, description, isabstract, parentclassname, istablecreator, isfixedtable, hasversion, haslock) values
-('Feature', 'F_MetaClass', 'f_feature', 1, 'Feature metaclass', 0, 'ClassDefinition', 0, 1, 0, 0); 
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', IDENT_CURRENT('f_classdefinition'), 'featid', 'FeatId', 1, 'NUMBER', 20, 0, 'int64', 0, 1, 1, 1, 1, 0,
-SYSTEM_USER, 'Feature id number (uniquely identifies a feature)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', IDENT_CURRENT('f_classdefinition'), 'revisionnumber', 'RevisionNumber', 'NUMBER', 0, 0, 'double', 0, 0, 1, 1, 1, 1,
-SYSTEM_USER, 'Edit count for supporting optimistic locking.  This value is incremented everytime the object is updated.',
-0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, idposition, columntype, columnsize, columnscale, attributetype, 
-isnullable, isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('f_feature', IDENT_CURRENT('f_classdefinition'), 'classid', 'ClassId', 1, 'NUMBER', 20, 0, 'int64', 0, 0, 1, 1, 1, 0,
-SYSTEM_USER, 'Class id number (uniquely identifies a class)', 0, 1);
-
-insert into f_attributedefinition
-(tablename, classid, columnname, attributename, columntype, columnsize, columnscale, attributetype, geometrytype, isnullable, 
-isfeatid, issystem, isreadonly, isautogenerated, isrevisionnumber, owner, description, iscolumncreator, isfixedcolumn) values
-('n/a', IDENT_CURRENT('f_classdefinition'), 'n/a', 'Bounds', 'GEOMETRY', 0, 0, '4', '84224', 1, 0, 1, 1, 0, 0,
-SYSTEM_USER, 'Bounding box for the feature', 0, 0);
-
-#endif
-
-
 create table f_spatialcontextgroup (
 #ifdef Oracle
     scgid           number(20) not null,



More information about the fdo-commits mailing list