Changes to the db2sql plugin to make it better maintainable

Signed-off-by: Haru <haru@dotalux.com>