Tests with datalog and tx functions