mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
Extract running SQL from the resource
in the separate assembly. This allow breaking of the SQLite.sql into separate pieces later.
This commit is contained in:
parent
e2604733f2
commit
40a5b7bc00
1 changed files with 18 additions and 9 deletions
|
|
@ -55,7 +55,16 @@ namespace Cosmos.Debug.Common {
|
||||||
|
|
||||||
internal void CreateDB()
|
internal void CreateDB()
|
||||||
{
|
{
|
||||||
using (var strm = typeof(SQL).Assembly.GetManifestResourceStream(typeof(SQL), "SQLite.sql"))
|
ExecuteAssemblyResource("SQLite.sql");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Exceutes SQL file stored inside assembly.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="resourceName">Name of the assembly resource to execute.</param>
|
||||||
|
internal void ExecuteAssemblyResource(string resourceName)
|
||||||
|
{
|
||||||
|
using (var strm = typeof(SQL).Assembly.GetManifestResourceStream(typeof(SQL), resourceName))
|
||||||
{
|
{
|
||||||
if (strm == null)
|
if (strm == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue