CSPACE-5943: Use prepared statements, rather than dynamically-build SQL that accepts user-supplied input.