Forum Discussion

TSeieroe's avatar
TSeieroe
Contributor
16 years ago

DataSource - Sorting & Reading

Can you sort the datasource and How?

Can you read all rows in at once and How?

I need to read all of the following into my next call to alter their values:

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.ExternalPort 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.InternalClient 0.0.0.0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.InternalPort 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingDescription
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingEnabled 0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingLeaseDuration 300
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.PortMappingProtocol TCP
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PortMapping.1.RemoteHost

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    If it's a JDBC datasource you can sort the result using "order by" in your sql, otherwise there is no further way to sort the returned rows.

    Regarding the reading of all rows, you would need to create a groovy script that
    1) manually increase the datasource by calling its .next(..) method
    2) writes each rows value from the datasource to  a temporary property

    then use those properties in your request via property-expansion..

    does that make sense?

    regards!

    /Ole
    eviware.com