Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Atennop1 authored Jun 3, 2023
1 parent 66c0c2f commit 7413088
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RelationalDatabaseDataWriter allows you to write data to your relational databas
```c#
var relationalDatabaseDataWriter = new RelationalDatabaseDataWriter(database, enumerationStringFactory);
IDatabaseValue[] values = { new RelationalDatabaseValue("age", 19), new RelationalDatabaseValue("first_name", "Anatoliy"), new RelationalDatabaseValue("last_name", "Oleynikov") };
relationalDatabaseDataWriter.WriteData("humans", values); //equals to "INSERT INTO humans (age, first_name, last_name) VALUES (19, 'Anatoliy', 'Oleynikov')"
relationalDatabaseDataWriter.Write("humans", values); //equals to "INSERT INTO humans (age, first_name, last_name) VALUES (19, 'Anatoliy', 'Oleynikov')"
```

### **RelationalDatabaseDataReader**
Expand All @@ -64,7 +64,7 @@ RelationalDatabaseDataReader allows you to read data from your relational databa
```c#
var relationalDatabaseDataReader = new RelationalDatabaseDataReader(database, enumerationStringFactory);
DataTable dataTable = relationalDatabaseDataReader.GetData("humans", new string[] { }); //equals to "SELECT * FROM humans"
dataTable = relationalDatabaseDataReader.GetData("humans", new[] { "first_name" }, new IDatabaseValue[] { new RelationalDatabaseValue("age", 19) }); //equals to "SELECT first_name FROM humans WHERE age = 19"
dataTable = relationalDatabaseDataReader.Read("humans", new[] { "first_name" }, new IDatabaseValue[] { new RelationalDatabaseValue("age", 19) }); //equals to "SELECT first_name FROM humans WHERE age = 19"
```

### **RelationalDatabaseDataUpdater**
Expand All @@ -76,8 +76,8 @@ var relationalDatabaseDataUpdater = new RelationalDatabaseDataUpdater(database,
var replacedArguments = new IDatabaseValue[] { new RelationalDatabaseValue("age", 20) };
var argumentsWhichChanging = new IDatabaseValue[] { new RelationalDatabaseValue("first_name", "Anatoliy") };

relationalDatabaseDataUpdater.UpdateData("humans", replacedArguments, argumentsWhichChanging); //equals to "UPDATE humans SET age = 20 WHERE first_name = 'Anatoliy'"
relationalDatabaseDataUpdater.UpdateData("humans", replacedArguments); //equals to "UPDATE humans SET age = 20"
relationalDatabaseDataUpdater.Update("humans", replacedArguments, argumentsWhichChanging); //equals to "UPDATE humans SET age = 20 WHERE first_name = 'Anatoliy'"
relationalDatabaseDataUpdater.Update("humans", replacedArguments); //equals to "UPDATE humans SET age = 20"
```

### **RelationalDatabaseDataDeleter**
Expand All @@ -87,7 +87,7 @@ RelationalDatabaseDataDeleter allows you to delete data from your relational dat
```c#
var relationalDatabaseDataDeleter = new RelationalDatabaseDataDeleter(database, enumerationStringFactory);
IDatabaseValue[] values = { new RelationalDatabaseValue("age", 19), new RelationalDatabaseValue("first_name", "Anatoliy"), new RelationalDatabaseValue("last_name", "Oleynikov") };
relationalDatabaseDataDeleter.DeleteData("humans", values); //equals to "DELETE FROM humans WHERE age = 19 AND first_name = 'Anatoliy' AND last_name = 'Oleynikov'"
relationalDatabaseDataDeleter.Delete("humans", values); //equals to "DELETE FROM humans WHERE age = 19 AND first_name = 'Anatoliy' AND last_name = 'Oleynikov'"
```

## **Conclusion**
Expand Down

0 comments on commit 7413088

Please sign in to comment.