/// <summary>Return a list of table names</summary> public List <string> GetTableNames() { List <string> tableNames = new List <string>(); DataTable tableData = ExecuteQuery("SELECT * FROM sqlite_master"); foreach (string tableName in DataTableUtilities.GetColumnAsStrings(tableData, "Name")) { tableNames.Add(tableName); } return(tableNames); }
/// <summary>Return a list of table names</summary> public List <string> GetViewNames() { List <string> tableNames = new List <string>(); DataTable tableData = ExecuteQuery("SELECT * FROM sqlite_master"); var names = DataTableUtilities.GetColumnAsStrings(tableData, "Name"); var types = DataTableUtilities.GetColumnAsStrings(tableData, "Type"); for (int i = 0; i < names.Length; i++) { if (types[i] == "view") { tableNames.Add(names[i]); } } return(tableNames); }