예제 #1
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));
        }
예제 #2
0
        public static int DeleteAll(string tableName, string databaseName)
        {
            BaseData  bd    = new BaseData(databaseName);
            TableData table = bd.GetTable(tableName);

            return(table.DeleteAll());
        }
예제 #3
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));
        }
예제 #4
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);
        }
예제 #5
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;
 }
예제 #6
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);
 }
예제 #7
0
 public static int DeleteAll(string tableName, string databaseName)
 {
     BaseData bd = new BaseData(databaseName);
     TableData table = bd.GetTable(tableName);
     return table.DeleteAll();
 }
예제 #8
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);
 }