From: <jam...@di...> - 2011-10-24 12:40:30
|
>> structure top >> structure arguments >> string search // this is for the INSERT INTO table VALUES(...) No sorry that isn't what I meant, the "insert into" is just the SQL representation of the NTTable input, not the actual data. The server returns an NTTable but the input is also an NTTable. It's not possible to have a single structure argument in the server because NTTable is a family of types, not a single type with a single FieldDesc. I think I need some help from Greg to check out this example. I assert that the point of channelRPC was to allow high level applications to use NTTables as their input and output. James From: Marty Kraimer [mailto:mrk...@co...] Sent: 24 October 2011 13:03 To: epi...@li... Subject: Re: NTTable and RPC On 10/24/2011 07:31 AM, jam...@di...<mailto:jam...@di...> wrote: > How are you trying to define the generic SQL insert statement as a PVStructure? > Just provide a little more info. > Marty I'm making the possibly incorrect assumption that the generic insert uses a table, on the basis that 'high level applications use an NTTable modelled as a corba any' INSERT INTO table VALUES ("string column", 99, 10e-3) structure NTTable { string [] col1; int [] col2; double [] col3; } INSERT INTO table VALUES (99, 10e-3, "another string column", " one more string column") structure NTTable { int [] col1; double [] col2; string [] col3; string [] col4; } James So what you want is that what is returned from channelRPC is an NTTable. What you want in the server is a top level structure that looks something like: structure top structure arguments string search // this is for the INSERT INTO table VALUES(...) What the service returns is a PVStructure that is an NTTable. Note that the client that uses channelRPC implements: public interface ChannelRPCRequester extends Requester { void channelRPCConnect(Status status,ChannelRPC channelRPC,PVStructure pvArgument,BitSet bitSet); void requestDone(Status status,PVStructure pvResponse); } The pvArgument in channelRPCConnect will be the "structure arguments". The pvResponse in requestDone is the NTTable. Marty -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom |