Пример #1
0
 private void SaveCompleteDeleteQuery()
 {
     if (String.IsNullOrWhiteSpace(_queryFilter))
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("DELETE", ($"DELETE FROM {_queryTable}"));
     }
     else
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("DELETE", ($"DELETE FROM {_queryTable} WHERE {_queryFilter}"));
     }
 }
 private void SaveCompletedSelectQuery()
 {
     if (String.IsNullOrWhiteSpace(_queryFilter))
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("SELECT", ($"SELECT {_queryColumn} FROM {_queryTable}"));
     }
     else
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("SELECT", ($"SELECT {_queryColumn} FROM {_queryTable} WHERE {_queryFilter}"));
     }
 }
Пример #3
0
 private void SaveCompleteUpdateQuery()
 {
     if (String.IsNullOrWhiteSpace(_queryFilter))
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("UPDATE", $"UPDATE {_queryTable} SET {_queryValues}");
     }
     else
     {
         var newSaveQuery = new QuerySaver();
         newSaveQuery.SaveCompletedQuery("UPDATE", $"UPDATE {_queryTable} SET {_queryValues} WHERE {_queryFilter}");
     }
 }
Пример #4
0
        private void SaveCompleteInsertQuery()
        {
            var newSaveQuery = new QuerySaver();

            newSaveQuery.SaveCompletedQuery("INSERT", $"INSERT INTO {_queryTable} ({_queryColumn}) VALUES ({_queryValues})");
        }