Esempio n. 1
0
		public void RenderAndShow(TableBase table, int showEntries = 25)
		{
			if (Debugger.IsAttached == false)
				return;

			using (var tx = env.NewTransaction(TransactionFlags.Read))
			{
				RenderAndShow(tx, table, showEntries);
			}
		}
Esempio n. 2
0
		public void RenderAndShow(Transaction tx, TableBase table, int showEntries = 25)
		{
			if (Debugger.IsAttached == false)
				return;

			var tree = tx.State.GetTree(tx, table.TableName);

			var path = Path.Combine(System.Environment.CurrentDirectory, "test-tree.dot");
			var rootPageNumber = tree.State.RootPageNumber;
			TreeDumper.Dump(tx, path, tx.GetReadOnlyPage(rootPageNumber), showEntries);

			var output = Path.Combine(System.Environment.CurrentDirectory, "output.svg");
			var p = Process.Start(FindGraphviz() + @"\bin\dot.exe", "-Tsvg " + path + " -o " + output);
			p.WaitForExit();
			Process.Start(output);
		}
Esempio n. 3
0
		public long GetEntriesCount(TableBase table)
		{
			using (var tx = env.NewTransaction(TransactionFlags.Read))
			{
				return tx.State.GetTree(tx,table.TableName).State.EntriesCount;
			}
		}