Refactor SqlQuery case class as trait with companion object, so that it ...

...will be possible better check its creation
Split explanation, with a more detailled one about case with custom parser for generated key(s).