-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from FastReports/sync_branch_637509732058278375
FastReport OpenSource 2021.2.0
- Loading branch information
Showing
122 changed files
with
50,435 additions
and
3,281 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...tReport.Data/FastReport.ClickHouse/FastReport.ClickHouse/ClickHouseAssemblyInitializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using FastReport.Utils; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FastReport.ClickHouse | ||
{ | ||
public class ClickHouseAssemblyInitializer : AssemblyInitializerBase | ||
{ | ||
public ClickHouseAssemblyInitializer() | ||
{ | ||
RegisteredObjects.AddConnection(typeof(ClickHouseDataConnection),"ClickHouse"); | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...Report.Data/FastReport.ClickHouse/FastReport.ClickHouse/ClickHouseConnection.DesignExt.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using ClickHouse.Client.ADO; | ||
using ClickHouse.Client.Types; | ||
using FastReport.Data; | ||
using FastReport.Data.ConnectionEditors; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FastReport.ClickHouse | ||
{ | ||
public partial class ClickHouseDataConnection | ||
{ | ||
public override Type GetParameterType() | ||
{ | ||
return typeof(ClickHouseTypeCode); | ||
} | ||
public override ConnectionEditorBase GetEditor() | ||
{ | ||
return new ClickHouseConnectionEditor(); | ||
} | ||
public override string GetConnectionId() | ||
{ | ||
ClickHouseConnectionStringBuilder builder = new ClickHouseConnectionStringBuilder(ConnectionString); | ||
string info = ""; | ||
try | ||
{ | ||
info = builder.Database; | ||
} | ||
catch | ||
{ | ||
} | ||
return "ClickHouse: " + info; | ||
} | ||
} | ||
} |
196 changes: 196 additions & 0 deletions
196
...t.Data/FastReport.ClickHouse/FastReport.ClickHouse/ClickHouseConnectionEditor.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
...FastReport.Data/FastReport.ClickHouse/FastReport.ClickHouse/ClickHouseConnectionEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Drawing; | ||
using System.Data; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
using FastReport.Data.ConnectionEditors; | ||
using FastReport.Forms; | ||
using FastReport.Utils; | ||
using ClickHouse.Client.ADO; | ||
|
||
namespace FastReport.Data | ||
{ | ||
public partial class ClickHouseConnectionEditor : ConnectionEditorBase | ||
{ | ||
private string FConnectionString; | ||
private void Localize() | ||
{ | ||
//for now is empty. | ||
} | ||
|
||
protected override string GetConnectionString() | ||
{ | ||
ClickHouseConnectionStringBuilder builder = new ClickHouseConnectionStringBuilder(FConnectionString); | ||
|
||
builder.Username = tbUserName.Text; | ||
builder.Host = tbServer.Text; | ||
builder.Port = ushort.Parse(tbPort.Text); | ||
builder.Password = tbPassword.Text; | ||
builder.Database = tbDatabase.Text; | ||
|
||
return builder.ToString(); | ||
} | ||
|
||
protected override void SetConnectionString(string value) | ||
{ | ||
FConnectionString = value; | ||
ClickHouseConnectionStringBuilder builder = new ClickHouseConnectionStringBuilder(FConnectionString); | ||
tbServer.Text = builder.Host; | ||
tbUserName.Text = builder.Username; | ||
tbPassword.Text = builder.Password; | ||
tbDatabase.Text = builder.Database; | ||
tbPort.Text = builder.Port.ToString(); | ||
} | ||
|
||
public ClickHouseConnectionEditor() | ||
{ | ||
InitializeComponent(); | ||
Localize(); | ||
} | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.