Class JsonDataSourceConnection
FastReport json connection
Inherited Members
Namespace: FastReport.Data.JsonConnection
Assembly: FastReport.OpenSource.dll
Syntax
public class JsonDataSourceConnection : DataConnectionBase, IFRSerializable, IParent
Constructors
JsonDataSourceConnection()
Initialize a new instance
Declaration
public JsonDataSourceConnection()
Fields
TABLE_NAME
Name of json object table
Declaration
public const string TABLE_NAME = "JSON"
Field Value
| Type | Description |
|---|---|
| System.String |
Methods
CreateAllTables(Boolean)
Fills the Tables collection with all tables available in the database.
Declaration
public override void CreateAllTables(bool initSchema)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | initSchema | Set to true to initialize each table's schema. |
Overrides
CreateDataSet()
Initializes a DataSet instance.
Declaration
protected override DataSet CreateDataSet()
Returns
| Type | Description |
|---|---|
| DataSet | The DataSet object. |
Overrides
Remarks
This method is used to support FastReport infrastructure. You don't need to use it.
CreateRelations()
Creates the relations between tables. Applies to XmlDataConnection only.
Declaration
public override void CreateRelations()
Overrides
CreateTable(TableDataSource)
Creates table. For internal use only.
Declaration
public override void CreateTable(TableDataSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| TableDataSource | source |
Overrides
DeleteTable(TableDataSource)
Deletes table. For internal use only.
Declaration
public override void DeleteTable(TableDataSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| TableDataSource | source |
Overrides
FillTableData(DataTable, String, CommandParameterCollection)
Fills the table data.
Declaration
public override void FillTableData(DataTable table, string selectCommand, CommandParameterCollection parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| DataTable | table | DataTable to fill. |
| System.String | selectCommand | The SQL select command. |
| CommandParameterCollection | parameters | SQL parameters. |
Overrides
Remarks
Usually you don't need to use this method. Internally it uses the GetConnection() and GetAdapter(String, DbConnection, CommandParameterCollection) methods to fill the table data. If you create own connection component that does not use nor connection or adapter, then you need to override this method.
FillTableSchema(DataTable, String, CommandParameterCollection)
Fills the table schema.
Declaration
public override void FillTableSchema(DataTable table, string selectCommand, CommandParameterCollection parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| DataTable | table | DataTable to fill. |
| System.String | selectCommand | The SQL select command. |
| CommandParameterCollection | parameters | SQL parameters. |
Overrides
Remarks
Usually you don't need to use this method. Internally it uses the GetConnection() and GetAdapter(String, DbConnection, CommandParameterCollection) methods to fill the table schema. If you create own connection component that does not use nor connection or adapter, then you need to override this method.
GetTableNames()
Gets an array of table names available in the database.
Declaration
public override string[] GetTableNames()
Returns
| Type | Description |
|---|---|
| System.String[] | An array of strings. |
Overrides
QuoteIdentifier(String, DbConnection)
Quotes the specified DB identifier such as table name or column name.
Declaration
public override string QuoteIdentifier(string value, DbConnection connection)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | Identifier to quote. |
| DbConnection | connection | The opened DB connection. |
Returns
| Type | Description |
|---|---|
| System.String | The quoted identifier. |
Overrides
SetConnectionString(String)
Sets the connection string.
Declaration
protected override void SetConnectionString(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | New connection string. |
Overrides
Remarks
Use this method if you need to perform some actions when the connection string is set.