예제 #1
0
        public static void Main2(string[] args)
        {
            TBDatabaseKeeper tbDatabaseKeeper = new TBDatabaseKeeper();
            DataKeeper       dataKeeper       = new DataKeeper(tbDatabaseKeeper);

            CLIParser parser = new CLIParser(dataKeeper);

            parser.parseArguments(args);
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                CLIParser.Main2(args);
            }
            else
            {
                //JsonDatabaseKeeper keeper= new JsonDatabaseKeeper();
                TBDatabaseKeeper keeper = new TBDatabaseKeeper();
                DataKeeper       dk     = new DataKeeper(keeper);
                var columns             = new List <string>();
                var ncolumns            = new List <string>();
                var values  = new List <string>();
                var nvalues = new List <string>();
                columns.AddRange(new[] { "Col1", "Col2", "Col3" });
                ncolumns.AddRange(new[] { "Col4", "Col5" });
                values.AddRange(new[] { "a1", "a2", "a3" });
                nvalues.AddRange(new[] { "b1", "b2", "b3" });

                //dk.CreateDatabase("AJsonDB", @"C:\scrap");
                dk.LoadDatabase("AJsonDB", @"C:\scrap");
                dk.SelectDatabase("AJsonDB");

                //dk.CreateTable("MyFirstTable",columns);
                //dk.DeleteTable("MyFirstTable");
                //var table = dk.ReadTable("MyFirstTable");
                //dk.AddEntries("MyFirstTable", "Col1", values);
                //dk.AddColumns("MyFirstTable", ncolumns);
                //dk.UpdateEntry("MyFirstTable","Col1",1,"c2");
                //dk.InsertEntries("MyFirstTable", "Col1",1,nvalues);
                //var columnEntries = dk.ReadColumn("MyFirstTable", "Col1");
                //dk.DeleteColumn("MyFirstTable","Col1");
                dk.DeleteEntries("MyFirstTable", "Col1", 2, 3);

                //Importer.Importer importer= new Importer.Importer();
                //var parsedcsv = importer.ReadCsv(@"C:\scrap\AJsonDB\exampleCSV.csv");
            }
        }