Example #1
0
        private static QueryResult ExecuteQuery(DazzleDatabase db, string query)
        {
            Console.WriteLine();
            Console.WriteLine("Query: " + query);

            var result = db.ExecuteQuery(query);

            Console.WriteLine("Returned Rows: " + result.Rows.Count + " Columns per row: " +
                              result.Rows[0].Columns.Count);
            Console.WriteLine("Query executed in " + result.ExecutionTime);
            return result;
        }
Example #2
0
        private static void Main(string[] args)
        {
            if (preload)
                PreloadData();

            using (var db = new DazzleDatabase(path))
            {
                var result1 = ExecuteQuery(db, "select * from users where column49 = 'bob9000'");
                var result2 = ExecuteQuery(db, "select * from users where column49 = 'bob9000'");
                var result3 = ExecuteQuery(db, "select column0, column1, column2, column3, column4 from users where column49 = 'bob9000'");
            }
            Console.ReadKey();
        }