moved DBCommandCursor helpers to their own compilation unit #606