Beispiel #1
0
        public Trigger Build(Trigger trigger)
        {
            if (table == null) table = new TableBuilder().Build();
            table.Triggers.Add(trigger);
            trigger.ParentObject = table;
            trigger.Schema = schema ?? new SchemaBuilder().Build();
            trigger.Type = SqlObjectType.SqlDmlTrigger;

            return trigger;
        }
Beispiel #2
0
 public void FixtureSetUp()
 {
     using (var session = SessionFactory.OpenSession())
     {
         testedObject = session.CreateCriteria<Index>()
             .Add(Restrictions.Eq("Name", "PK_test_table"))
             .UniqueResult<Index>();
         expectedTable = session.CreateCriteria<Table>()
             .Add(Restrictions.Eq("Name", "test_table"))
             .UniqueResult<Table>();
     }
 }
Beispiel #3
0
 public TriggerBuilder With(Table table)
 {
     this.table = table;
     return this;
 }
Beispiel #4
0
 public void FixtureSetUp()
 {
     using (var session = SessionFactory.OpenSession())
     {
         expectedTable = session.CreateCriteria<Table>()
             .Add(Restrictions.Eq("Name", "test_table"))
             .UniqueResult<Table>();
         column = session.CreateCriteria<Column>()
             .Add(Restrictions.Eq("Name", "test"))
             .Add(Restrictions.Eq("ParentObject", expectedTable))
             .UniqueResult<Column>();
         expectedType = TypeMapTestBase.GetTypeByName("varchar", session);
     }
 }