问题
What is maximum value for IntegerProperty, LongProperty in Google App Engine Python?
回答1:
IntegerProperty is an int or a long:
int or long An integer value, up to 64 bits.
Python int values are converted to Python long values prior to storage. A value stored as an int will be returned as a long.
If a long larger than 64 bits is assigned, only the least significant 64 bits are stored.
And for added clarity, you can use sys.maxint to find the actual value (run this in a shell and "import sys" first)
回答2:
There is no LongProperty
on Google App Engine, but only IntegerProperty and as already pointed it's a 64-bit signed integer.
This number has a minimum −9,223,372,036,854,775,808
and maximum 9,223,372,036,854,775,807
.
来源:https://stackoverflow.com/questions/20169228/what-is-maximum-value-of-int-or-long-in-google-app-engine-datastore