Overview
These public interfaces are used in Sage components. They are provided for implementing advanced functionality in your scripts. In order for you to use these interfaces in your project, you have to reference CozyRoc.SSISPlus.dll and Sage.SData.Client.dll libraries. Also include CozyRoc.SqlServer.SSIS and CozyRoc.Sage namespaces.
IConnection / ISageConnection
When you call Sage Connection Manager AcquireConnection method, it returns object implementing IConnection interface. This is the interface used for interaction with Sage SData service.
Methods
Connects to Sage SData service. The method result is object implementing ISDataService interface.
Closes the connection to Sage SData service. Use always after you finish working with the service.
Returns true if connected to the service.
Gets entity list for specific operation. These are the method parameters:
- operation (uint) - It can be one of the options listed in the following table.
Value Description 0 Return entities, which can be read. 1 Return entities, which support record creation/update. 2 Return entities, which can be deleted.
Gets specified entity composite entities list. These are the method parameters:
- root (string) - entity name.
Get object used to manipulate Sage SData entity. The method returns IEntity object. These are the method parameters:
- name (string) - entity name.
Properties
Specify the name or IP address of the Sage SData server.
Specify application identifier.
Specify contract identifier.
Specify dataset.
Specify user name to access the Sage SData service.
Specify user password to access the Sage SData service.
Specify the number of seconds before timing out session connect. The default value of this property is 100 seconds.
Specify if all clients should use the same connection. This property has the options listed in the following table.
Value | Description |
---|---|
True | All clients use same connection (default). |
False | Every client uses different connection. |
Specify the name or IP address of the proxy server.
Specify the port number on the proxy server to use for the connection.
Specify user name to access the proxy server.
Specify password to access the proxy server.
IProperty / ISageProperty
This interface is used to retrieve Sage SData property information.
Properties
Returns property name.
Returns true if property is entity key.
Returns true if property is read-only.
Returns property type.
Returns property length.
Returns property precision.
Returns property scale.
Returns internal SDataSchemaValueProperty object.
IEntity / ISageEntity
This interface is used for Sage SData entity management.
Methods
Get entity properties. The method returns array of IProperty objects.
Constructs in-memory entity (AtomEntry) instance.
Sets property value in in-memory entity. These are the method parameters:
- entity (object) - in-memory entity instance.
- property (string) - property name.
- value (string) - property value.
Returns property value from in-memory object. These are the method parameters:
- entity (object) - in-memory entity instance.
- property (string) - property name.
Retrieves data from Sage SData service. The result is IEnumerable object. These are the method parameters:
- query (object) - If data is retrieved from regular Sage entity, the query parameter should contain list of SData query parameters. Multiple parameters are separated with newline. If data is retrieved from composite entity, the query parameter should contain entity identifier or object. Multiple identifiers are separated with semicolon (;).
- batchSize (int) - batch size.
Creates record(s) in entity. The result is a list of newly created records key. If record creation fails, error code is reported instead. These are the method parameters:
- entity (object) - single entity or list of entities.
Updates existing record(s) in entity. The result is a list of updated records key. If record update fails, error code is reported instead. These are the method parameters:
- entity (object) - single entity or list of entities.
Updates existing records in composite entity. These are the method parameters:
- entity (object) - Sage entity object.
- id (string) - entity identifier. Multiple identifiers are separated with semicolon (;).
- list (object array) - array of Sage entity objects with update data.
Deletes record(s) in object. The result is a list of deleted records key. If record deletion fails, error code is reported instead. These are the method parameters:
- id (object) - single entity or list of entities.
Properties
Returns the entity name.
Returns true if composite entity.
Knowledge Base
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.