Exemple #1
0
        protected override void LoadTables()
        {
            using (DataTable dataTable = sqliteConnection.GetSchema(SQLiteMetaDataCollectionNames.Tables, new string[] { currentCatalogName })) {
                foreach (DataRow row in dataTable.Rows)
                {
                    if (TablesToLoad.Contains(row["TABLE_NAME"].ToString()))
                    {
                        SourceSchema.Catalogs[currentCatalogName].Tables.Add(row["TABLE_NAME"].ToString(), new SQLite.Table(row));
                    }
                }
            }

            foreach (SQLite.Table table in SourceSchema.Catalogs[currentCatalogName].Tables.Values)
            {
                currentTableName = table.Name;
                LoadColumns();
                LoadForeignKeys();
                LoadIndexes();
                //    LoadTriggers();
            }
        }
Exemple #2
0
        protected override void LoadTables()
        {
            using (DataTable dataTable = sqlConnection.GetSchema(SqlClientMetaDataCollectionNames.Tables, new string[] { null, currentSchemaName, null, "BASE TABLE" })) {
                foreach (DataRow row in dataTable.Rows)
                {
                    if (!defaultIgnores.Contains(row["TABLE_NAME"].ToString()))
                    {
                        if (TablesToLoad.Contains(row["TABLE_NAME"].ToString()))
                        {
                            SourceSchema.Schemas[currentSchemaName].Tables.Add(row["TABLE_NAME"].ToString(), new SqlServer.Table(row));
                        }
                    }
                }
            }

            foreach (SqlServer.Table table in SourceSchema.Schemas[currentSchemaName].Tables.Values)
            {
                currentTableName = table.TableName;
                LoadColumns();
                LoadForeignKeys();
                LoadIndexes();
                //LoadTriggers();
            }
        }