public wDBTable(string name, DatabaseClient root) { rootLocation = root.currentFolderLocation; dbc = root.Clone(); dbc.SelectDB("$" + name); dbc.SetCurrentDBAsRoot(); dbc.ReturnToRoot(); }
public wDBTable(string name, DatabaseClient root) { rootLocation = root.currentFolderLocation; dbc = root.Clone(); dbc.SelectDB("$" + name); dbc.SetCurrentDBAsRoot(); dbc.ReturnToRoot(); }
public wDBRowCollection GetRows() { dbc.ReturnToRoot(); string[] rowNums = dbc.ListDatabases(); List <wDBTableRow> rows = new List <wDBTableRow>(); for (int i = 0; i < rowNums.Length; i++) { string rowNum = rowNums[i]; dbc.SelectDB(rowNum); rows.Add( new wDBTableRow(dbc) ); dbc.ReturnToRoot(); } return(new wDBRowCollection(rows)); }
public static void CreateTable(string tableName, DatabaseClient parentDB) { if (parentDB.ExistDB("$" + tableName) == DatabaseClient.DBResponse.Exists) { return; } parentDB.CreateDB("$" + tableName); DatabaseClient dbc = parentDB.Clone(); dbc.SelectDB("$" + tableName); dbc.SetValue(".rowsAdded", "0"); }
public DatabaseClient SelectDB2(string targetDB, bool autocreate) { DatabaseClient result = this.Clone(); DBResponse response = result.SelectDB(targetDB, autocreate); if (response == DBResponse.doesNotExist) { return(null); } else if (response == DBResponse.Selected) { return(result); } else { return(null); } }