Esempio n. 1
0
        public CodeGenDb(SqlServerGenie owner)
        {
            genie = owner;
            owner.Model.MetaObjects.SetUnprocessedAll();
            environment = owner.Model.Lamp.GenieLampUtils.GetEnvironmentHelper(TargetEnvironment.SqlServer);

            createDatabase   = genie.Config.Params.ValueByName("Database.Create", createDatabase);
            databaseName     = genie.Config.Params.ParamByName("Database.Name", true).Value;
            createSchemas    = genie.Config.Params.ValueByName("Schemas.Create", createSchemas);
            useUniqueIndexes = genie.Config.Params.ValueByName("UniqueIndexConstraint", useUniqueIndexes);

            updater = owner.Model.Lamp.CodeWritersFactory.CreateCodeWriterTransactSql();
            updater.DefaultOutFileEncoding = owner.Config.OutFileEncoding;
            creator = genie.Model.Lamp.CodeWritersFactory.CreateCodeWriterTransactSql();
            creator.DefaultOutFileEncoding = owner.Config.OutFileEncoding;
            cleaner = genie.Model.Lamp.CodeWritersFactory.CreateCodeWriterTransactSql();
            cleaner.DefaultOutFileEncoding = owner.Config.OutFileEncoding;

            outFileNameDDLCreate = Path.Combine(genie.Config.OutDir, "CRE_" + genie.Config.OutFileName);
            outFileNameDDLUpdate = Path.Combine(genie.Config.OutDir, "UPD_" + genie.Config.OutFileName);
            outFileNameDDLDelete = Path.Combine(genie.Config.OutDir, "DEL_" + genie.Config.OutFileName);
        }
Esempio n. 2
0
 public DbUpdater(SqlServerGenie genie)
 {
     this.genie = genie;
 }