diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-19 18:52:45 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-19 18:52:45 +0200 |
| commit | d9b0b7617864600f690a8202d06b2fb2a64306db (patch) | |
| tree | eca093060ff23172158c90f2c2c1b0d59a42bf6f /Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs | |
| parent | cc3bf81fabd005fa74c2b9663589892480f1a6bb (diff) | |
| download | Tango-d9b0b7617864600f690a8202d06b2fb2a64306db.tar.gz Tango-d9b0b7617864600f690a8202d06b2fb2a64306db.zip | |
Started working on 'Synchronization' - Machine Studio module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs index b3d259e8c..add791b19 100644 --- a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs +++ b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs @@ -100,6 +100,16 @@ namespace Tango.Synchronization.Local return table; } + public void ClearDataBase() + { + foreach (var table in Tables) + { + var dropCommand = _connection.CreateCommand(); + dropCommand.CommandText = String.Format("DELETE FROM {0};", table.TableName); + dropCommand.ExecuteNonQuery(); + } + } + /// <summary> /// Clones a table from another database into this database. /// </summary> |
