示例#1
0
 protected virtual void AddAuditColumns(Table auditTable,
     IEnumerable<AuditColumn> auditColumns)
 {
     foreach (var column in auditColumns)
       {
     auditTable.AddColumn(column);
     if (column.IncludeInPrimaryKey)
       auditTable.PrimaryKey.AddColumn(column);
       }
 }
示例#2
0
		private void BindColumn(HbmColumn hbmColumn, Table table, bool isNullable)
		{
			var col = new Column {Value = value};
			BindColumn(hbmColumn, col, isNullable);

			if (table != null)
				table.AddColumn(col);

			value.AddColumn(col);

			//column index
			BindIndex(hbmColumn.index, table, col);
			//column group index (although it can serve as a separate column index)
			BindUniqueKey(hbmColumn.uniquekey, table, col);
		}
示例#3
0
 public void PrepareTemporaryTables(IMapping mapping, Dialect.Dialect dialect)
 {
     if (dialect.SupportsTemporaryTables)
     {
         temporaryIdTableName = dialect.GenerateTemporaryTableName(Table.Name);
         Table table = new Table();
         table.Name = temporaryIdTableName;
         foreach (Column column in Table.PrimaryKey.ColumnIterator)
         {
             table.AddColumn((Column)column.Clone());
         }
         temporaryIdTableDDL = table.SqlTemporaryTableCreateString(dialect, mapping);
     }
 }
示例#4
0
 protected virtual void CopyColumns(Table dataTable,
     Table auditTable)
 {
     foreach (var column in dataTable.ColumnIterator)
     auditTable.AddColumn((Column)column.Clone());
 }