def convert_column_to_int_or_id(type, column, registry=None): if column.primary_key or column.foreign_keys: return graphene.ID( description=get_column_doc(column), required=not (is_column_nullable(column)), ) else: return graphene.Int( description=get_column_doc(column), required=not (is_column_nullable(column)), )
def convert_json_to_generic_scalar(type, column, registry=None): return GenericScalar( description=get_column_doc(column), required=not(is_column_nullable(column)))
def convert_column_to_string(type, column, registry=None): return String(description=get_column_doc(column), required=not (is_column_nullable(column)))
def _convert_geometry(thetype, column, registry=None): return GeoJSON(description=get_column_doc(column), required=not (is_column_nullable(column)))
def _convert_datetime(thetype, column, registry=None): return DateTime(description=get_column_doc(column), required=not (is_column_nullable(column)))
def convert_column_to_dict(type, column, registry=None): return PassThroughType(description=get_column_doc(column), required=not(is_column_nullable(column)))