diff --git a/e2e/Sandbox/DashboardCreators/MySqlDashboard.cs b/e2e/Sandbox/DashboardCreators/MySqlDashboard.cs deleted file mode 100644 index a2cf5e9..0000000 --- a/e2e/Sandbox/DashboardCreators/MySqlDashboard.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Reveal.Sdk.Dom; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Sandbox.DashboardFactories -{ - internal class MySqlDashboard : IDashboardCreator - { - public string Name => "MySql data source"; - - public RdashDocument CreateDashboard() - { - throw new NotImplementedException(); - } - } -} diff --git a/e2e/Sandbox/DashboardCreators/MySqlDataSourceDashboards.cs b/e2e/Sandbox/DashboardCreators/MySqlDataSourceDashboards.cs index c6c7ece..bd32e22 100644 --- a/e2e/Sandbox/DashboardCreators/MySqlDataSourceDashboards.cs +++ b/e2e/Sandbox/DashboardCreators/MySqlDataSourceDashboards.cs @@ -17,14 +17,14 @@ public class MySqlDataSourceDashboards : IDashboardCreator public RdashDocument CreateDashboard() { - var mysqlDS = new MySQLDataSource + var mysqlDS = new MySqlDataSource { Id = "mysqlDS", Title = "MySQL DS", Subtitle = "My SQL Datasource", Host = "revealdb01.infragistics.local", Database = "northwind", - Port = "3306", + Port = 3306, }; var mysqlDSItem = new MySqlDataSourceItem("employees report to ID", mysqlDS) diff --git a/e2e/Sandbox/MainWindow.xaml.cs b/e2e/Sandbox/MainWindow.xaml.cs index 34b4df8..ac71a0c 100644 --- a/e2e/Sandbox/MainWindow.xaml.cs +++ b/e2e/Sandbox/MainWindow.xaml.cs @@ -61,7 +61,7 @@ public partial class MainWindow : Window new MSAnalysisServiceDashboard(), new MSAzureAnalysisServiceDashboard(), new MSAzureSqlDashboard(), - new MySqlDashboard(), + new MySqlDataSourceDashboards(), new MSAzureSqlServerDSDashboard(), new ODataDashboard(), new OracleDashboard(), diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs index d49f00e..a462c06 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs @@ -19,7 +19,7 @@ public class MySqlDataSourceItemFixture public void Constructor_SetsTitleAndDataSource_WhenCalled(string title) { // Arrange - var dataSource = new MySQLDataSource(); + var dataSource = new MySqlDataSource(); // Act var item = new MySqlDataSourceItem(title, dataSource); @@ -34,7 +34,7 @@ public void Constructor_SetsTitleAndDataSource_WhenCalled(string title) public void ProcessDataOnServer_SetsAndGetsServerAggregationValue_WithInputs() { // Arrange - var item = new MySqlDataSourceItem("Test Item", new MySQLDataSource()); + var item = new MySqlDataSourceItem("Test Item", new MySqlDataSource()); // Act item.ProcessDataOnServer = true; @@ -80,7 +80,7 @@ public void ToJsonString_CreatesFormattedJson_ForMySQLDataSource() } """; - var dataSource = new MySQLDataSource() + var dataSource = new MySqlDataSource() { Id = "mySqlId", Title = "MySQL DS", diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs index 8771ced..5cb9591 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs @@ -18,7 +18,7 @@ public class MySQLDataSourceFixture public void Constructor_SetsProviderToMySQL_WhenConstructed() { // Act - var dataSource = new MySQLDataSource(); + var dataSource = new MySqlDataSource(); // Assert Assert.Equal(DataSourceProvider.MySQL, dataSource.Provider); @@ -28,7 +28,7 @@ public void Constructor_SetsProviderToMySQL_WhenConstructed() public void Constructor_InitializesPropertiesToDefaultValues_WhenInstanceIsCreated() { // Act - var dataSource = new MySQLDataSource(); + var dataSource = new MySqlDataSource(); // Assert Assert.NotNull(dataSource); @@ -74,7 +74,7 @@ public void ToJsonString_CreatesFormattedJson_ForMySQLDataSource() } """; - var dataSource = new MySQLDataSource() + var dataSource = new MySqlDataSource() { Id = "mySqlId", Title = "MySQL DS", diff --git a/src/Reveal.Sdk.Dom/Data/DataSourceItems/MySqlDataSourceItem.cs b/src/Reveal.Sdk.Dom/Data/DataSourceItems/MySqlDataSourceItem.cs index b98cefc..e990bde 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSourceItems/MySqlDataSourceItem.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSourceItems/MySqlDataSourceItem.cs @@ -5,6 +5,16 @@ namespace Reveal.Sdk.Dom.Data { public class MySqlDataSourceItem : ProcedureDataSourceItem, IProcessDataOnServer { + public MySqlDataSourceItem(string title, string table, MicrosoftSqlServerDataSource dataSource) : + this(title, dataSource) + { + Table = table; + } + + public MySqlDataSourceItem(string title, MySqlDataSource dataSource) : + base(title, dataSource) + { } + public MySqlDataSourceItem(string title, DataSource dataSource) : base(title, dataSource) { } @@ -18,7 +28,7 @@ public bool ProcessDataOnServer protected override DataSource CreateDataSourceInstance(DataSource dataSource) { - return Create(dataSource); + return Create(dataSource); } } } diff --git a/src/Reveal.Sdk.Dom/Data/DataSources/MySQLDataSource.cs b/src/Reveal.Sdk.Dom/Data/DataSources/MySQLDataSource.cs index b114804..4c5883e 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSources/MySQLDataSource.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSources/MySQLDataSource.cs @@ -2,9 +2,9 @@ namespace Reveal.Sdk.Dom.Data { - public class MySQLDataSource : ProcessDataSource + public class MySqlDataSource : ProcessDataSource { - public MySQLDataSource() + public MySqlDataSource() { Provider = DataSourceProvider.MySQL; }