Skip to content

Commit

Permalink
modified RunPlatformOptions to print derived manifest data
Browse files Browse the repository at this point in the history
  • Loading branch information
black-eagle17 committed Aug 27, 2021
1 parent ea4f3e8 commit 2fc9d40
Show file tree
Hide file tree
Showing 9 changed files with 545 additions and 466 deletions.
471 changes: 238 additions & 233 deletions yuniql-cli/CommandLineService.cs

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions yuniql-cli/ManifestData.cs

This file was deleted.

75 changes: 40 additions & 35 deletions yuniql-extensibility/IDataService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Data;

Expand Down Expand Up @@ -50,12 +50,12 @@ public interface IDataService
/// Returns true if the database platform or version supports batch sql statements.
/// For example, SQL Server uses GO word as default batch terminator while Snowflow uses semicolon (;).
/// </summary>
bool IsBatchSqlSupported { get; }


/// <summary>
/// Returns true if the database supports single MERGE or UPSERT sql statement
/// </summary>
bool IsBatchSqlSupported { get; }


/// <summary>
/// Returns true if the database supports single MERGE or UPSERT sql statement
/// </summary>
bool IsUpsertSupported { get; }

/// <summary>
Expand Down Expand Up @@ -86,8 +86,8 @@ public interface IDataService
/// <summary>
/// Returns the SQL statement to use for creating new database if --auto-createdb flag is set to true.
/// </summary>
public string GetSqlForCreateDatabase();

public string GetSqlForCreateDatabase();

/// <summary>
/// Returns the SQL statement to use for dropping existing database
/// </summary>
Expand Down Expand Up @@ -127,38 +127,43 @@ public interface IDataService
/// <summary>
/// Returns the SQL statement to use for creating new entry into migration tracking table.
/// </summary>
public string GetSqlForInsertVersion();

public string GetSqlForInsertVersion();

/// <summary>
/// Returns the SQL statement to use for updating version in migration tracking table.
/// </summary>
public string GetSqlForUpdateVersion();

public string GetSqlForUpdateVersion();

/// <summary>
/// Returns the SQL statement to use for merging new entry into migration tracking table.
/// </summary>
public string GetSqlForUpsertVersion();

/// <summary>
/// Returns true if the version tracking table requires upgrade for this release
/// </summary>
/// <returns></returns>
public string GetSqlForCheckRequireMetaSchemaUpgrade(string currentSchemaVersion);

/// <summary>
/// Returns sql for upgrade the existing version tracking table
/// </summary>
/// <returns></returns>
public string GetSqlForUpgradeMetaSchema(string requiredSchemaVersion);

/// <summary>
/// Try parses error from database specific exception.
/// </summary>
/// <param name="exception">The exc.</param>
/// <param name="result">The parsed error.</param>
/// <returns>
/// True, if the parsing was sucessfull otherwise false
/// </returns>
public string GetSqlForUpsertVersion();

/// <summary>
/// Returns true if the version tracking table requires upgrade for this release
/// </summary>
/// <returns></returns>
public string GetSqlForCheckRequireMetaSchemaUpgrade(string currentSchemaVersion);

/// <summary>
/// Returns sql for upgrade the existing version tracking table
/// </summary>
/// <returns></returns>
public string GetSqlForUpgradeMetaSchema(string requiredSchemaVersion);

/// <summary>
/// Try parses error from database specific exception.
/// </summary>
/// <param name="exception">The exc.</param>
/// <param name="result">The parsed error.</param>
/// <returns>
/// True, if the parsing was sucessfull otherwise false
/// </returns>
bool TryParseErrorFromException(Exception exception, out string result);

///<summary>
/// Returns instance of ManifestData in IDataService implementations
///</summary>
public ManifestData GetManifestData();
}
}
12 changes: 12 additions & 0 deletions yuniql-extensibility/ManifestData.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;

namespace Yuniql.Extensibility{

Expand All @@ -10,6 +11,17 @@ public class ManifestData
public string SupportedVersions;
public string Usage;
public string Samples;

public void printData()
{
var info = string.Format(@"
Name: {0}
SupportedVersions: {1}
Usage:{2}
Samples: {3}
",Name,SupportedVersions,Usage,Samples);
Console.WriteLine(info);
}
}

}
Loading

0 comments on commit 2fc9d40

Please sign in to comment.