public override void Drop(IDbConnection connection)
		{
			var sql = new Insight.Database.Schema.AutoProc(Name.Original, new SqlColumnDefinitionProvider(connection), null).DropSql;

			foreach (string s in _goSplit.Split(sql).Where(piece => !String.IsNullOrWhiteSpace(piece)))
				connection.ExecuteSql(s);
		}
Esempio n. 2
0
        public override void Drop(IDbConnection connection)
        {
            var sql = new Insight.Database.Schema.AutoProc(Name.Original, new SqlColumnDefinitionProvider(connection), null).DropSql;

            foreach (string s in _goSplit.Split(sql).Where(piece => !String.IsNullOrWhiteSpace(piece)))
            {
                connection.ExecuteSql(s);
            }
        }
		public override void Install(IDbConnection connection, IEnumerable<SchemaObject> objects)
		{
			// for auto-procs, convert the comment into a list of stored procedures
			var sql = new Insight.Database.Schema.AutoProc(Name.Original, new SqlColumnDefinitionProvider(connection), objects).Sql;
			if (sql.Length == 0)
				return;

			foreach (string s in _goSplit.Split(sql).Where(piece => !String.IsNullOrWhiteSpace(piece)))
				connection.ExecuteSql(s);
		}
Esempio n. 4
0
        public override void Install(IDbConnection connection, IEnumerable <SchemaObject> objects)
        {
            // for auto-procs, convert the comment into a list of stored procedures
            var sql = new Insight.Database.Schema.AutoProc(Name.Original, new SqlColumnDefinitionProvider(connection), objects).Sql;

            if (sql.Length == 0)
            {
                return;
            }

            foreach (string s in _goSplit.Split(sql).Where(piece => !String.IsNullOrWhiteSpace(piece)))
            {
                connection.ExecuteSql(s);
            }
        }