Class StructuredDataSource
- Inheritance
-
StructuredDataSource
- Implements
- Inherited Members
- Namespace
- TabularEditor.TOMWrapper
- Assembly
- TOMWrapper.dll
Represents a data source that uses JSON-based extensible protocol to define the location and mechanism of retrieving the data.
public sealed class StructuredDataSource : DataSource, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IDescriptionObject, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
- Extension Methods
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.
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.
public StructuredDataSource.AddressImpl Address { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.AddressImpl |
AddressModel
Model name. This is a shortcut for ConnectionDetails.Address.Model.
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.
[TypeConverter(typeof(AuthenticationKindConverter))]
public string AuthenticationKind { get; set; }
Property Value
Type | Description |
---|---|
string |
ConnectionString
Connection string. This is a shortcut for ConnectionDetails.Address.ConnectionString.
[TypeConverter(typeof(ConnectionStringConverter))]
public string ConnectionString { get; set; }
Property Value
Type | Description |
---|---|
string |
ContentType
Content type. This is a shortcut for ConnectionDetails.Address.ContentType.
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
string |
ContextExpression
For internal use only.
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.
public StructuredDataSource.CredentialImpl Credential { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.CredentialImpl |
Database
Database name. This is a shortcut for ConnectionDetails.Address.Database.
public string Database { get; set; }
Property Value
Type | Description |
---|---|
string |
Domain
Domain. This is a shortcut for ConnectionDetails.Address.Domain.
public string Domain { get; set; }
Property Value
Type | Description |
---|---|
string |
EmailAddress
Email address. This is a shortcut for ConnectionDetails.Address.EmailAddress.
public string EmailAddress { get; set; }
Property Value
Type | Description |
---|---|
string |
EncryptConnection
Whether connection must be encrypted. This is a shortcut for Credential.EncryptConnection.
public bool EncryptConnection { get; set; }
Property Value
Type | Description |
---|---|
bool |
Object
Object. This is a shortcut for ConnectionDetails.Address.Object.
public string Object { get; set; }
Property Value
Type | Description |
---|---|
string |
Options
Protocol-specific options used to connect the data source
public StructuredDataSource.DataSourceOptionsImpl Options { get; }
Property Value
Type | Description |
---|---|
StructuredDataSource.DataSourceOptionsImpl |
Parent
The parent Model of the current Structured Data Source.
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.
public string Password { get; set; }
Property Value
Type | Description |
---|---|
string |
Path
Path. This is a shortcut for ConnectionDetails.Address.Path.
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.
public string PrivacySetting { get; set; }
Property Value
Type | Description |
---|---|
string |
Property
Property. This is a shortcut for ConnectionDetails.Address.Property.
public string Property { get; set; }
Property Value
Type | Description |
---|---|
string |
Protocol
Connection protocol
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.
public string Query { get; set; }
Property Value
Type | Description |
---|---|
string |
Resource
Resource. This is a shortcut for ConnectionDetails.Address.Resource.
public string Resource { get; set; }
Property Value
Type | Description |
---|---|
string |
Schema
Schema name. This is a shortcut for ConnectionDetails.Address.Schema.
public string Schema { get; set; }
Property Value
Type | Description |
---|---|
string |
Server
Server address. This is a shortcut for ConnectionDetails.Address.Server;
public string Server { get; set; }
Property Value
Type | Description |
---|---|
string |
Url
Url. This is a shortcut for ConnectionDetails.Address.Url.
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.
public string Username { get; set; }
Property Value
Type | Description |
---|---|
string |
View
View. This is a shortcut for ConnectionDetails.Address.View.
public string View { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Clone(string)
Creates an exact copy of this StructuredDataSource object.
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.
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
protected override void Init()
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.
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. |