예제 #1
0
        private void CreateForeignKeys(HashSet <ForeignKey> foreignKeys)
        {
            HashSet <string> ListQuery = PreperQuery.PreperQueryCreateForeignKey(foreignKeys);

            foreach (string query in ListQuery)
            {
                Insertquery(query);
            }
        }
예제 #2
0
        private void CreateTables(HashSet <Table> tables)
        {
            List <string> ListQuery = PreperQuery.PreperQueryCreateTable(tables);

            for (int i = 0; i < sequence.Count; ++i)
            {
                Insertquery(ListQuery[sequence[i]]);
            }
        }
예제 #3
0
        private void CreatePrimaryKeys(HashSet <PrimaryKey> primaryKeys)
        {
            HashSet <string> ListQuery = PreperQuery.PreperQueryCreatePrimaryKey(primaryKeys);

            foreach (string query in ListQuery)
            {
                Insertquery(query);
            }
        }
예제 #4
0
        private void DeleteDb(HashSet <Table> tables)
        {
            List <string> ListQuery = PreperQuery.PreperQueryDropTable(tables);

            for (int i = sequence.Count - 1; i >= 0; --i)
            {
                Insertquery(ListQuery[sequence[i]]);
            }
        }
예제 #5
0
        private void InsertData(HashSet <Table> tables, HashSet <DataFromTable> dataFromTables)
        {
            List <Table>         TabelList     = tables.ToList();
            List <DataFromTable> DataTableList = dataFromTables.ToList();

            for (int i = 0; i < sequence.Count; ++i)
            {
                HashSet <string> ListQuery = PreperQuery.PreperInsertQuery(DataTableList[sequence[i]], TabelList[sequence[i]]);
                foreach (string query in ListQuery)
                {
                    Insertquery(query);
                }
            }
        }