Exemplo n.º 1
0
 private TableData(string name, BaseData database, List<ColumnData> columns)
 {
     Name = name;
     DataBase = database;
     Columns = columns;
     VerifyPhysicalModel();
 }
Exemplo n.º 2
0
 public static int Update(string tableName, string databaseName, List<string> columnNames, List<string> columnOldValues, List<string> columnNewValues)
 {
     int count = 0;
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     for(int i = 0; i < columnNames.Count; i++)
     {
        count += table.UpdateValue(columnNames[i], columnOldValues[i], columnNewValues[i]);
     }
     return count;
 }
Exemplo n.º 3
0
 public static int DeleteAll(string tableName, string databaseName)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.DeleteAll();
 }
Exemplo n.º 4
0
 public static int DeleteByColumnValues(string tableName, string databaseName, List<string> columnNames, List<string> columnValues)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.DeleteByColumnValues(columnNames, columnValues);
 }
Exemplo n.º 5
0
 public static int InsertInto(string tableName, string databaseName, List<string> values, List<string> columns = null)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.Insert(values, columns);
 }
Exemplo n.º 6
0
 public static TableData CreateNew(string name, BaseData database, List<ColumnData> columns)
 {
     TableData table = new TableData(name, database, columns);
     return table;
 }
Exemplo n.º 7
0
        public static TableData CreateNew(string name, BaseData database, List <ColumnData> columns)
        {
            TableData table = new TableData(name, database, columns);

            return(table);
        }
Exemplo n.º 8
0
 public static void DropDatabase(string databaseName)
 {
     BaseData database = new BaseData(databaseName);
     database.Drop();
 }
Exemplo n.º 9
0
 public static BaseData CreateDataBase(string name, int size = 10, int filegrowth = 5, string datasourse = null, string filepath = null)
 {
     BaseData dataBase = new BaseData(name, size, filegrowth, datasourse, filepath);
     dataBase.CreatePhysicalModel(); 
     return dataBase;
 }