Class StructuredDataSource
Represents a data source that uses JSON-based extensible protocol to define the location and mechanism of retrieving the data.
Inheritance
Implements
Inherited Members
Namespace: TabularEditor.TOMWrapper
Assembly: TOMWrapper.dll
Syntax
public sealed class StructuredDataSource : DataSource, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IDescriptionObject, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
Remarks
This metadata object is only supported when the compatibility level of the database is at 1400 or above.
Properties
Account
Account. This is a shortcut for ConnectionDetails.Address.Account.
Declaration
public string Account { get; set; }
Property Value
Type | Description |
---|---|
string |
Address
Address of a connection. It contains protocol name and protocol-specific properties like server and database name.
Declaration
public StructuredDataSource.AddressImpl Address { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.AddressImpl |
AddressModel
Model name. This is a shortcut for ConnectionDetails.Address.Model.
Declaration
public string AddressModel { get; set; }
Property Value
Type | Description |
---|---|
string |
AuthenticationKind
Authentication kind, usually one of the AuthenticationKind constants. This is a shortcut for Credential.AuthenticationKind.
Declaration
[TypeConverter(typeof(AuthenticationKindConverter))]
public string AuthenticationKind { get; set; }
Property Value
Type | Description |
---|---|
string |
ConnectionString
Connection string. This is a shortcut for ConnectionDetails.Address.ConnectionString.
Declaration
[TypeConverter(typeof(ConnectionStringConverter))]
public string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
string |
ContentType
Content type. This is a shortcut for ConnectionDetails.Address.ContentType.
Declaration
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
string |
ContextExpression
For internal use only.
Declaration
public string ContextExpression { get; set; }
Property Value
Type | Description |
---|---|
string |
Credential
Protocol-specific options used to authenticate the connection. The most common options are also available as properties on the data source object itself, such as Account and Password, etc.
Declaration
public StructuredDataSource.CredentialImpl Credential { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.CredentialImpl |
Database
Database name. This is a shortcut for ConnectionDetails.Address.Database.
Declaration
public string Database { get; set; }
Property Value
Type | Description |
---|---|
string |
Domain
Domain. This is a shortcut for ConnectionDetails.Address.Domain.
Declaration
public string Domain { get; set; }
Property Value
Type | Description |
---|---|
string |
EmailAddress
Email address. This is a shortcut for ConnectionDetails.Address.EmailAddress.
Declaration
public string EmailAddress { get; set; }
Property Value
Type | Description |
---|---|
string |
EncryptConnection
Whether connection must be encrypted. This is a shortcut for Credential.EncryptConnection.
Declaration
public bool EncryptConnection { get; set; }
Property Value
Type | Description |
---|---|
bool |
Object
Object. This is a shortcut for ConnectionDetails.Address.Object.
Declaration
public string Object { get; set; }
Property Value
Type | Description |
---|---|
string |
Options
Protocol-specific options used to connect the data source
Declaration
public StructuredDataSource.DataSourceOptionsImpl Options { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.DataSourceOptionsImpl |
Parent
The parent Model of the current Structured Data Source.
Declaration
public Model Parent { get; }
Property Value
Type | Description |
---|---|
Model |
Password
Password property or null if it's not set. This is a shortcut for Credential.Password.
Declaration
public string Password { get; set; }
Property Value
Type | Description |
---|---|
string |
Path
Path. This is a shortcut for ConnectionDetails.Address.Path.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
string |
PrivacySetting
Privacy setting from PrivacyClass or null if it's not present in the Credential property. Missing value is equivalent to the value of PrivacyClass.None.
Declaration
public string PrivacySetting { get; set; }
Property Value
Type | Description |
---|---|
string |
Property
Property. This is a shortcut for ConnectionDetails.Address.Property.
Declaration
public string Property { get; set; }
Property Value
Type | Description |
---|---|
string |
Protocol
Connection protocol
Declaration
public string Protocol { get; set; }
Property Value
Type | Description |
---|---|
string |
Query
Native query (typically a SQL statement) to be sent to the source. This is a shortcut for ConnectionDetails.Query.
Declaration
public string Query { get; set; }
Property Value
Type | Description |
---|---|
string |
Resource
Resource. This is a shortcut for ConnectionDetails.Address.Resource.
Declaration
public string Resource { get; set; }
Property Value
Type | Description |
---|---|
string |
Schema
Schema name. This is a shortcut for ConnectionDetails.Address.Schema.
Declaration
public string Schema { get; set; }
Property Value
Type | Description |
---|---|
string |
Server
Server address. This is a shortcut for ConnectionDetails.Address.Server;
Declaration
public string Server { get; set; }
Property Value
Type | Description |
---|---|
string |
Url
Url. This is a shortcut for ConnectionDetails.Address.Url.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
string |
Username
Username property or null if it's not set. This is a shortcut for Credential.Username.
Declaration
public string Username { get; set; }
Property Value
Type | Description |
---|---|
string |
View
View. This is a shortcut for ConnectionDetails.Address.View.
Declaration
public string View { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Clone(string)
Creates an exact copy of this StructuredDataSource object.
Declaration
public StructuredDataSource Clone(string newName = null)
Parameters
Type | Name | Description |
---|---|---|
string | newName |
Returns
Type | Description |
---|---|
StructuredDataSource |
CreateNew(Model, string)
Creates a new StructuredDataSource and adds it to the parent Model. Also creates the underlying metadataobject and adds it to the TOM tree.
Declaration
public static StructuredDataSource CreateNew(Model parent, string name = null)
Parameters
Type | Name | Description |
---|---|---|
Model | parent | |
string | name |
Returns
Type | Description |
---|---|
StructuredDataSource |
Init()
Derived members should override this method to instantiate child objects
Declaration
protected override void Init()
Overrides
OnPropertyChanging(string, object, ref bool, ref bool)
Called before a property is changed on an object. Derived classes can control how the change is handled. Throw ArgumentException within this method, to display an error message in the UI.
Declaration
protected override void OnPropertyChanging(string propertyName, object newValue, ref bool undoable, ref bool cancel)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | Name of the changed property. |
object | newValue | New value assigned to the property. |
bool | undoable | Return false if automatic undo of the property change is not needed. |
bool | cancel | Return true if the property change should not apply. |