Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

XSDS (XS Data Services)

$
0
0

dear gurus,

 

I am working on an XSDS exercise and I am able to get some pieces of my code working, for example.. if I query for a specific  column value, I am able to get what I need, however, I would like it to be more flexible, such as if I pass an array of values and I need to check these values against more than one column, I would like to do the equivalent to an In clause in a select statement in SqlScript, for example:

 

in sql I can do:

 

select * from my table where col in (val1, val2, .. valN) and col2 in (val21, val22, .. valNN)

 

in XSDS, I could accomplish this if I have my entity and I know in advance how many filters I need such as

 

entiry.$query().$where( entity.column.$eq( val1 ).$or( entity.column.$eq( val2 ) ...

 

 

if I were to put this in a for loop, then my results will not return as each iteration would generate and AND operator so that if my val1 and val2 are not the same my query returns 0 records.. ideally I would like to return the results from query eq val 1, val2, etc

 

I have also attempted to have a query and run the execute() function on each iteration of the loop and assigning that to a temp array of values, however, if I do that, on my next condition to verify multiple values for another column, then I would get additional records which I don't need.

 

 

any pointers are appreciated..


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>