...
Code Block | ||
---|---|---|
| ||
def date = new Date() def q = api.queryApi() def t1 = q.tables().products() def t2 = q.tables().productExtensionRows("Cost") return q.source(t1, [t1.sku(), t1.ProductGroup]) .leftOuterJoin(t2, { cols -> [t2.Cost, t2.Currency] }, { cols -> q.exprs().and( t2.sku().equal(cols.sku), t2.ValidFrom.lessOrEqual(date), t2.ValidTo.greaterOrEqual(date), ) } ) .stream { it.collect { it } } |
...