Пример #1
0
        /// <summary>
        /// Delete all data (be careful with it, make secure copy)
        /// </summary>
        public void Truncate()
        {
            SQLiteManager db    = GetDb();
            List <string> names = db.GetTableNames();

            foreach (string name in names)
            {
                db.TruncateTable(name);
            }
        }
Пример #2
0
        /// <summary>
        /// Print row count of all tables to the console
        /// </summary>
        public void PrintTableCount()
        {
            SQLiteManager db    = GetDb();
            List <string> names = db.GetTableNames();

            foreach (string name in names)
            {
                string sql = "SELECT COUNT(*) AS cnt FROM " + name;
                print(name + ": " + db.GetResultReader(sql)["cnt"]);
            }
        }