private void ReadScripts() { foreach (IBSharpClass scriptDef in Context.ResolveAll(ScriptPrototype)) { ExtendedScripts.Add(new SqlScript().Setup(this, scriptDef, scriptDef.Compiled)); } }
private void SetupDefaultScripts() { if (GenerationOptions.IncludeDialect.HasFlag(DbDialect.SqlServer) && GenerationOptions.GenerateCreateScript) { if (GenerationOptions.Supports(SqlObjectType.FileGroup)) { ExtendedScripts.Add(new SqlScript { Name = "sys:support_for_filegroups_begin", Mode = ScriptMode.Create, DbDialect = DbDialect.SqlServer, Position = ScriptPosition.Before, Text = DefaultScripts.SqlServerCreatePeramble }); ExtendedScripts.Add(new SqlScript { Name = "sys:support_for_filegroups_end", Mode = ScriptMode.Create, DbDialect = DbDialect.SqlServer, Position = ScriptPosition.After, Text = DefaultScripts.SqlServerCreateFinisher }); } } if (GenerationOptions.IncludeDialect.HasFlag(DbDialect.PostGres)) { ExtendedScripts.Add(new SqlScript { Name = "sys:psql_start", Mode = ScriptMode.Create, DbDialect = DbDialect.PostGres, Position = ScriptPosition.Before, Text = DefaultScripts.PostgresqlPeramble }); ExtendedScripts.Add(new SqlScript { Name = "sys:psql_end", Mode = ScriptMode.Create, DbDialect = DbDialect.PostGres, Position = ScriptPosition.After, Text = DefaultScripts.PostgresqlFinisher }); ExtendedScripts.Add(new SqlScript { Name = "sys:psql_start", Mode = ScriptMode.Drop, DbDialect = DbDialect.PostGres, Position = ScriptPosition.Before, Text = DefaultScripts.PostgresqlPeramble }); ExtendedScripts.Add(new SqlScript { Name = "sys:psql_end", Mode = ScriptMode.Drop, DbDialect = DbDialect.PostGres, Position = ScriptPosition.After, Text = DefaultScripts.PostgresqlFinisher }); } }