Skip to content

Commit

Permalink
convert biginteger to float
Browse files Browse the repository at this point in the history
Biginteger can be too big for integer because integer is limited to 32
bit
  • Loading branch information
palmkevin committed Nov 18, 2016
1 parent ceb5cc5 commit 8ba849b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graphene_sqlalchemy/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def convert_column_to_string(type, column, registry=None):


@convert_sqlalchemy_type.register(types.SmallInteger)
@convert_sqlalchemy_type.register(types.BigInteger)
#@convert_sqlalchemy_type.register(types.BigInteger)
@convert_sqlalchemy_type.register(types.Integer)
def convert_column_to_int_or_id(type, column, registry=None):
if column.primary_key:
Expand All @@ -111,6 +111,7 @@ def convert_column_to_boolean(type, column, registry=None):

@convert_sqlalchemy_type.register(types.Float)
@convert_sqlalchemy_type.register(types.Numeric)
@convert_sqlalchemy_type.register(types.BigInteger)
def convert_column_to_float(type, column, registry=None):
return Float(description=column.doc, required=not(column.nullable))

Expand Down

0 comments on commit 8ba849b

Please sign in to comment.