Exemple #1
0
        protected override void PopulateTables(DbObjectCollection <Table> tablesCollection)
        {
            var tables = Connection.GetSchema("Tables", new[] { null, Connection.Database });

            foreach (DataRow row in tables.Rows)
            {
                if ((string)row["TABLE_TYPE"] == "BASE TABLE")
                {
                    var table = new MySqlTable(this)
                    {
                        Name = row["TABLE_NAME"].ToString()
                    };
                    tablesCollection.Add(table);
                }
            }

            var views = Connection.GetSchema("Views", new[] { null, Connection.Database });

            foreach (DataRow row in views.Rows)
            {
                var table = new MySqlTable(this)
                {
                    Name = row["TABLE_NAME"].ToString()
                };
                table.SetView(true);
                tablesCollection.Add(table);
            }
        }
Exemple #2
0
 public MySqlTrigger(MySqlTable table, DataRow schemaRow)
     : base(table)
 {
     this.table     = table;
     this.schemaRow = schemaRow;
     this.Name      = (string)schemaRow["TRIGGER_NAME"];
 }
        protected override void PopulateTables(DbObjectCollection <Table> tablesCollection)
        {
            var tables = this.Connection.GetSchema("Tables", new string[] { null, this.connection.Database });

            foreach (DataRow row in tables.Rows)
            {
                var table = new MySqlTable(this);
                table.Name = row["TABLE_NAME"].ToString();
                tablesCollection.Add(table);
            }

            var views = this.Connection.GetSchema("Views", new string[] { null, this.connection.Database });

            foreach (DataRow row in views.Rows)
            {
                var table = new MySqlTable(this);
                table.Name = row["TABLE_NAME"].ToString();
                table.SetView(true);
                tablesCollection.Add(table);
            }
        }
Exemple #4
0
 public MySqlTrigger(MySqlTable table, string name)
     : base(table)
 {
     this.table = table;
     Name       = name;
 }