Skip to content

Commit

Permalink
Merge pull request #54 from RevealBi/dsi-objects
Browse files Browse the repository at this point in the history
added initial DSI objects
  • Loading branch information
brianlagunas authored May 20, 2024
2 parents 07583bf + 622ce31 commit db30e5c
Show file tree
Hide file tree
Showing 30 changed files with 407 additions and 17 deletions.
10 changes: 5 additions & 5 deletions e2e/Sandbox/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ private void RevealView_DataSourcesRequested(object sender, DataSourcesRequested
sqlDS.Database = "Northwind"; //this is required
ds.Add(sqlDS);

//var sqlDSI = new RVSqlServerDataSourceItem(sqlDS);
//sqlDSI.Title = "SQL Server Data Source Item";
//sqlDSI.Subtitle = "SQL Server DSI Subtitle";
//sqlDSI.Table = "Customers";
//dsi.Add(sqlDSI);
var sqlDSI = new RVSqlServerDataSourceItem(sqlDS);
sqlDSI.Title = "SQL Server Data Source Item";
sqlDSI.Subtitle = "SQL Server DSI Subtitle";
sqlDSI.Table = "Customers";
dsi.Add(sqlDSI);

//var webDS = new RVWebResourceDataSource();
//webDS.UseAnonymousAuthentication = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Reveal.Sdk.Dom/Data/DataSourceItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Reveal.Sdk.Dom.Data
{
public class DataSourceItem : SchemaType
{
public DataSourceItem(string title, DataSource dataSource) : this()
public DataSourceItem(string title, DataSource dataSource) : this()
{
InitializeDataSource(dataSource, title);
InitializeDataSourceItem(title);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Reveal.Sdk.Dom.Data
{
internal class AmazonAthenaDataSourceItem : TableDataSourceItem
{
public AmazonAthenaDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Reveal.Sdk.Dom.Data
{
internal class AmazonRedshiftDataSourceItem : FunctionDataSourceItem
{
public AmazonRedshiftDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{
}
}
}
14 changes: 14 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/AmazonS3DataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class AmazonS3DataSourceItem : DataSourceItem
{
internal AmazonS3DataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Path { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/BoxDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class BoxDataSourceItem : DataSourceItem
{
internal BoxDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Identifier { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/DropboxDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class DropboxDataSourceItem : DataSourceItem
{
internal DropboxDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Path { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class GoogleAnalytics4DataSourceItem : DataSourceItem
{
internal GoogleAnalytics4DataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string AccountId { get; set; }

[JsonIgnore]
public string PropertyId { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class GoogleBigQueryDataSourceItem : TableDataSourceItem
{
internal GoogleBigQueryDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string DataSetId { get; set; }

[JsonIgnore]
public string ProjectId { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class GoogleDriveDataSourceItem : DataSourceItem
{
internal GoogleDriveDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Identitifer { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class GoogleSheetsDataSourceItem : DataSourceItem
{
internal GoogleSheetsDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public bool FirstRowContainsLabels { get; set; }

[JsonIgnore]
public string NamedRange { get; set; }

[JsonIgnore]
public string PivotTable { get; set; }

//todo: this is a nested object
//[JsonIgnore]
//public object Range { get; set; }

[JsonIgnore]
public string Sheet { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftAnalysisServicesDataSourceItem : DataSourceItem
{
internal MicrosoftAnalysisServicesDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Catalog { get; set; }

[JsonIgnore]
public string Cube { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftAzureAnalysisServicesDataSourceItem : DataSourceItem
{
internal MicrosoftAzureAnalysisServicesDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftAzureSqlDatabaseDataSourceItem : MicrosoftSqlServerDataSourceItem
{
internal MicrosoftAzureSqlDatabaseDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftAzureSynapseAnalyticsDataSourceItem : MicrosoftSqlServerDataSourceItem
{
public MicrosoftAzureSynapseAnalyticsDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftOneDriveDataSourceItem : DataSourceItem
{
internal MicrosoftOneDriveDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Identifier { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Reveal.Sdk.Dom.Data
{
internal class MicrosoftSharePointDataSourceItem : DataSourceItem
{
internal MicrosoftSharePointDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }
}
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
using Newtonsoft.Json;
using Reveal.Sdk.Dom.Core.Extensions;
using Reveal.Sdk.Dom.Core.Extensions;

namespace Reveal.Sdk.Dom.Data
{
public class MicrosoftSqlServerDataSourceItem : DataSourceItem
public class MicrosoftSqlServerDataSourceItem : ProcedureDataSourceItem
{
public MicrosoftSqlServerDataSourceItem(string title, MicrosoftSqlServerDataSource dataSource) :
base(title, dataSource)
{ }

public MicrosoftSqlServerDataSourceItem(string title, string table, MicrosoftSqlServerDataSource dataSource) :
base(title, dataSource)
{
{
Table = table;
}

internal MicrosoftSqlServerDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Table
{
get => Properties.GetValue<string>("Table");
set => Properties.SetItem("Table", value);
}

protected override void InitializeDataSource(DataSource dataSource, string title)
{
//todo: make generic and place in base class
Expand Down
17 changes: 17 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/MongoDbDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class MongoDbDataSourceItem : DataSourceItem
{
public MongoDbDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Collection { get; set; }

[JsonIgnore]
public bool ProcessDataOnServer { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/MySqlDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class MySqlDataSourceItem : ProcedureDataSourceItem
{
public MySqlDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public bool ProcessDataOnServer { get; set; }
}
}
20 changes: 20 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/ODataDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class ODataDataSourceItem : DataSourceItem
{
internal ODataDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string EntityType { get; set; }

[JsonIgnore]
public string FunctionQName { get; set; }

[JsonIgnore]
public string Url { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Reveal.Sdk.Dom.Data
{
internal class OracleDataSourceItem : ProcedureDataSourceItem
{
public OracleDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
public class PostgreSqlDataSourceItem : FunctionDataSourceItem
{
public PostgreSqlDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public bool ProcessDataOnServer { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Reveal.Sdk.Dom/Data/DataSourceItems/SnowflakeDataSourceItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class SnowflakeDataSourceItem : SchemaDataSourceItem
{
public SnowflakeDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public bool ProcessDataOnServer { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Newtonsoft.Json;

namespace Reveal.Sdk.Dom.Data
{
internal class WebServiceDataSourceItem : DataSourceItem
{
internal WebServiceDataSourceItem(string title, DataSource dataSource) :
base(title, dataSource)
{ }

[JsonIgnore]
public string Url { get; set; }
}
}
Loading

0 comments on commit db30e5c

Please sign in to comment.