3.2.4.5 Creating a New Set of Data and Sending It to the Server
The higher-level application invokes APIs to create a local RecordSet. The client can then perform operations on the local cache of data. These operations will result in a series of insert commands that MUST be maintained in the RecordSet. The client MUST then synchronize the RecordSet to the RDS Transport Protocol server, resulting in the records in the RecordSet being added to the data store.
To use the RecordSet in this mode, the client MUST ensure that the RecordSet has the same table definitions as the target database. The client MUST provide the following:
Data store connection string (see section 2.2.3.13.1).
Table name targeted for update.
The table name provided is stored in the RecordSet and MUST be used to specify the server table when the TableGram is created and sent to the server.
The client MUST establish a connection to the RDS Transport Protocol server, as specified in section 3.2.4.1.
The client MUST construct a TableGram (see section 3.1.1.2.3 for details). The client MUST send an rdsSynchronizeRequest message passing the TableGram (see section 2.2.3.14). If the RDS Transport Protocol server returns an error, the RDS Transport Protocol client MUST surface the error to the higher-level application.
The client MUST process rdsStatusArray (see section 2.2.3.13.10) in the rdsSynchronizeResponse and apply any relevant changes to the RecordSet. If the rdsStatusArray contains errors, the client software MUST surface those errors to the higher-level application.