Fix SQLLegacy to allow parameters as mapping
Add SQL read_parameters tests