Changes to the db2sql plugin to make it more maintainable

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