code: def get_check_declaration_sql(self, definition):
          
          constraints = []
          for field, def_ in definition.items():
              if isinstance(def_, basestring):
                  constraints.append("CHECK (%s)" % def_)
              else:
                  if "min" in def_:
                      constraints.append("CHECK (%s >= %s)" % (field, def_["min"]))
  
                  if "max" in def_:
                      constraints.append("CHECK (%s <= %s)" % (field, def_["max"]))
  
          return ", ".join(constraints)
docs: Obtains DBMS specific SQL code portion needed to set a CHECK constraint
          declaration to be used in statements like CREATE TABLE.
  
          :param definition: The check definition
          :type definition: dict
  
          :return: DBMS specific SQL code portion needed to set a CHECK constraint.
          :rtype: str