Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7247/src/Adapdev.Data/Schema
Modified Files:
DatabaseSchema.cs ForeignKeyAssociation.cs
OleDbSchemaBuilder.cs TableSchema.cs
Log Message:
Index: DatabaseSchema.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/DatabaseSchema.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DatabaseSchema.cs 26 Nov 2005 08:09:22 -0000 1.10
--- DatabaseSchema.cs 8 Feb 2006 03:00:00 -0000 1.11
***************
*** 132,135 ****
--- 132,136 ----
}
+
public override string ToString()
{
Index: OleDbSchemaBuilder.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/OleDbSchemaBuilder.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** OleDbSchemaBuilder.cs 26 Nov 2005 08:09:22 -0000 1.8
--- OleDbSchemaBuilder.cs 8 Feb 2006 03:00:00 -0000 1.9
***************
*** 153,156 ****
--- 153,157 ----
ti.Alias = dr["TABLE_NAME"].ToString();
ti.Name = dr["TABLE_NAME"].ToString();
+ ti.SchemaName = dr["TABLE_SCHEMA"].ToString();
ti.TableType = TableTypeConverter.Convert(dr["TABLE_TYPE"].ToString());
return ti;
Index: TableSchema.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/TableSchema.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** TableSchema.cs 27 Nov 2005 06:32:43 -0000 1.13
--- TableSchema.cs 8 Feb 2006 03:00:00 -0000 1.14
***************
*** 23,26 ****
--- 23,28 ----
protected ColumnSchemaDictionary columns = new ColumnSchemaDictionary();
protected DatabaseSchema parent = null;
+ protected string schemaName = String.Empty;
+
/// <summary>
***************
*** 258,261 ****
--- 260,270 ----
}
+ [XmlAttribute]
+ public string SchemaName
+ {
+ get { return schemaName; }
+ set { schemaName = value; }
+ }
+
/// <summary>
/// Returns a collection of ColumnSchemas
Index: ForeignKeyAssociation.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Schema/ForeignKeyAssociation.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ForeignKeyAssociation.cs 19 Jan 2006 03:50:40 -0000 1.11
--- ForeignKeyAssociation.cs 8 Feb 2006 03:00:00 -0000 1.12
***************
*** 189,197 ****
{
if(this.SecondForeignTable != null && this.ThirdForeignTable != null)
! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName + "-" + this.SecondForeignTableName + "." + this.SecondForeignColumnName + "-" + this.ThirdForeignTableName + "." + this.ThirdForeignColumnName;
else if(this.SecondForeignTable != null && this.ThirdForeignTable == null)
! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName + "-" + this.SecondForeignTableName + "." + this.SecondForeignColumnName;
else
! return this._table.Name + "." + this.ColumnName + "-" + this.ForeignTableName + "." + this.ForeignColumnName;
}
}
--- 189,197 ----
{
if(this.SecondForeignTable != null && this.ThirdForeignTable != null)
! return this.DisplayAssociation() + this._table.Name + "." + this.ColumnName + " - " + this.ForeignTableName + "." + this.ForeignColumnName + " - " + this.SecondForeignTableName + "." + this.SecondForeignColumnName + " - " + this.ThirdForeignTableName + "." + this.ThirdForeignColumnName;
else if(this.SecondForeignTable != null && this.ThirdForeignTable == null)
! return this.DisplayAssociation() + this._table.Name + "." + this.ColumnName + " - " + this.ForeignTableName + "." + this.ForeignColumnName + " - " + this.SecondForeignTableName + "." + this.SecondForeignColumnName;
else
! return this.DisplayAssociation() + this._table.Name + "." + this.ColumnName + " - " + this.ForeignTableName + "." + this.ForeignColumnName;
}
}
***************
*** 203,206 ****
--- 203,214 ----
}
+ private string DisplayAssociation()
+ {
+ if (this.AssociationType == AssociationType.OneToOne) return "(1-1) ";
+ if (this.AssociationType == AssociationType.OneToMany) return "(1-n) ";
+ if (this.AssociationType == AssociationType.ManyToMany) return "(n-n) ";
+ return String.Empty;
+ }
+
[Browsable(false)]
public override string ToString()
|