示例#1
0
        /// <summary>
        /// 获取所有已打开库的描述信息
        /// </summary>
        /// <returns></returns>
        public static Table GetAllDbInfo()
        {
            var tbl = new Table {
                { "name" }, { "info" }
            };

            foreach (var item in All)
            {
                int      cnt = item.Value.GetScalar <int>("select count(*) from sqlite_master where type='table'");
                FileInfo fi  = new FileInfo(Path.Combine(Kit.DataPath, item.Key + ".db"));
                tbl.AddRow(new { name = item.Key, info = $"{cnt - 1}张表,{Kit.GetFileSizeDesc((ulong)fi.Length)}" });
            }
            return(tbl);
        }