Refactor: new _getTableCondition()

Signed-off-by: Marc Delisle <marc@infomarc.info>