Example #1
0
        /*
         * Q = S,D,U,I  ================> Select/Update/Delete/Insert
         * Q = C =======================> Create database
         * Q = R =======================> dRop database
         * Q = T =======================> create Table
         * Q = O =======================> drOp table
         * Q = A =======================> Alter Table
         */
        public static void SelectQueryType(QueryI.Qur Q )
        {
            if (Q.Q == 'S' || Q.Q == 'D' || Q.Q == 'U' || Q.Q == 'I')
            {
                RecordQuery RQ = new RecordQuery(Q);
                QueryExecuter.ExecuteQuery(RQ);
            }
            else if (Q.Q == 'C' || Q.Q =='R' )
            {
                DBQuery DBQ = new DBQuery(Q);
             //   QueryExecuter.ExecuteQuery(DBQ);

                DBQ.ExecuteQuery();
            }
            else if (Q.Q == 'T' || Q.Q =='O' || Q.Q =='A')
            {
                TableQuery TQ = new TableQuery(Q);
                TQ.ExecuteQuery();
            }
        }
Example #2
0
 public TableQuery(QueryI.Qur q)
 {
     Q = q;
     filepath = Path.Combine(DirectoryOps.MainPath, DirectoryOps.Dirs[1], Q.Table+".xml");
 }
Example #3
0
        public RecordQuery(QueryI.Qur Qur)
        {
            Q = Qur;

            Tablepath = Path.Combine(StorageManger.DirectoryOps.MainPath, StorageManger.DirectoryOps.Dirs[2], "db_" + Q.Table);
        }
Example #4
0
 public static void ProcessQuery(QueryI.Qur Query)
 {
     QuerySelector.SelectQueryType(Query);
 }
Example #5
0
 public DBQuery(QueryI.Qur q)
 {
     Q = q;
 }