Esempio n. 1
0
 public PgSqlTrigger(PgSqlTable table, DataRow schemaRow)
     : base(table)
 {
     this.table     = table;
     this.schemaRow = schemaRow;
     this.Name      = (string)schemaRow["TRIGGER_NAME"];
 }
Esempio n. 2
0
        protected override void PopulateTables(DbObjectCollection <Table> tablesCollection)
        {
            var tables = this.Connection.GetSchema("Tables", new string[] { this.connection.Database, "public" });

            foreach (DataRow row in tables.Rows)
            {
                var table = new PgSqlTable(this);
                table.Name = row["table_name"] as string;
                tablesCollection.Add(table);
                if (row["table_type"] as string == "VIEW")
                {
                    table.SetView(true);
                }
            }
        }
Esempio n. 3
0
        protected override void PopulateTables(DbObjectCollection <Table> tablesCollection)
        {
            using (var tables = Connection.GetSchema("Tables", new[] { Connection.Database, "public" })) {
                foreach (DataRow row in tables.Rows)
                {
                    var table = new PgSqlTable(this, (string)row["table_name"]);
                    tablesCollection.Add(table);
                }
            }

            using (var views = Connection.GetSchema("Views", new[] { Connection.Database, "public" })) {
                foreach (DataRow row in views.Rows)
                {
                    var table = new PgSqlTable(this, (string)row["table_name"],
                                               isView: true, isReadOnly: (string)row["is_updatable"] == "NO");
                    tablesCollection.Add(table);
                }
            }
        }
Esempio n. 4
0
 public PgSqlTrigger(PgSqlTable table, string name)
     : base(table)
 {
     this.table = table;
     Name       = name;
 }