Skip to content

Commit

Permalink
added IDatabase.ExecuteProgrammabilityScript()
Browse files Browse the repository at this point in the history
  • Loading branch information
ormico committed Mar 22, 2016
1 parent ef7eccd commit 4ee1470
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Ormico.DbPatchManager.SqlServer/SqlDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,10 @@ public static string GetEmbededSql(string fileName)

return rc;
}

public void ExecuteProgrammabilityScript(string commandText)
{
ExecuteDDL(commandText);
}
}
}
2 changes: 2 additions & 0 deletions src/Ormico.DbPatchManager/IDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ public interface IDatabase: IDisposable
List<InstalledPatchInfo> GetInstalledPatches();

void LogInstalledPatch(string patchId);

void ExecuteProgrammabilityScript(string commandText);
}
}
5 changes: 5 additions & 0 deletions src/Ormico.DbPatchManager/OdbcDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ public void LogInstalledPatch(string patchId)
PatchId = patchId
}, commandType: System.Data.CommandType.Text);
}

public void ExecuteProgrammabilityScript(string commandText)
{
ExecuteDDL(commandText);
}
}
}
5 changes: 5 additions & 0 deletions src/Ormico.DbPatchManager/TestDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ void Save()
_io.File.WriteAllText(_fileName, JsonConvert.SerializeObject(_testDb, Formatting.Indented));
}

public void ExecuteProgrammabilityScript(string commandText)
{
ExecuteDDL(commandText);
}

class TestDb
{
public TestDb()
Expand Down

0 comments on commit 4ee1470

Please sign in to comment.