Esempio n. 1
0
        private async Task <string[]> CompareSchemasAsync(JMXSchema schema, JMXSchema fromDbSchema)
        {
            List <string> sql = new List <string>();

            using (SQLStatementWriter sb = new SQLStatementWriter(SqlServerHelper.TypeMapping, schema))
            {
                await CompareSchemasStatementsAsync(sb, schema, fromDbSchema);

                string stmt = sb.ToString();
                if (stmt.Length > 1)
                {
                    sql.Add(sb.ToString());
                }
            }
            return(sql.ToArray());
        }
Esempio n. 2
0
        private static string[] CreateNewStatements(JMXSchema schema)
        {
            List <string> sql = new List <string>();

            using (SQLStatementWriter sb = new SQLStatementWriter(SqlServerHelper.TypeMapping, schema))
            {
                sb.WriteCreateNewTableStatements();
                sql.Add(sb.ToString());
            }
            return(sql.ToArray());
        }
Esempio n. 3
0
        private async Task <string[]> DropSchemaStatementsAsync(JMXSchema fromDbSchema)
        {
            List <string> sql = new List <string>();

            using (SQLStatementWriter sb = new SQLStatementWriter(SqlServerHelper.TypeMapping, fromDbSchema))
            {
                await WriteDropStatementsAsync(sb, fromDbSchema);

                sql.Add(sb.ToString());
            }
            return(sql.ToArray());
        }