/* * 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(); } }
public DBQuery(QueryI.Qur q) { Q = q; }
public static void ProcessQuery(QueryI.Qur Query) { QuerySelector.SelectQueryType(Query); }
public TableQuery(QueryI.Qur q) { Q = q; filepath = Path.Combine(DirectoryOps.MainPath, DirectoryOps.Dirs[1], Q.Table + ".xml"); }
public RecordQuery(QueryI.Qur Qur) { Q = Qur; Tablepath = Path.Combine(StorageManger.DirectoryOps.MainPath, StorageManger.DirectoryOps.Dirs[2], "db_" + Q.Table); }