def url(self):
return '{}/{}/{}'.format(osm_api_base, self.osm_type, self.osm_id)
# class ItemCandidateTag(Base):
# __tablename__ = 'item_candidate_tag'
# __table_args__ = (
# ForeignKeyConstraint(['item_id', 'osm_id', 'osm_type'],
# [ItemCandidate.item_id,
# ItemCandidate.osm_id,
# ItemCandidate.osm_type]),
# )
#
# item_id = Column(Integer, primary_key=True)
# osm_id = Column(BigInteger, primary_key=True)
# osm_type = Column(osm_type_enum, primary_key=True)
# k = Column(String, primary_key=True)
# v = Column(String, primary_key=True)
#
# item_candidate = relationship(ItemCandidate,
# backref=backref('tag_table', lazy='dynamic'))
python类BigInteger()的实例源码
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big
def _integer_compare(t1, t2):
t1_small_or_big = (
'S' if isinstance(t1, sqltypes.SmallInteger)
else 'B' if isinstance(t1, sqltypes.BigInteger) else 'I'
)
t2_small_or_big = (
'S' if isinstance(t2, sqltypes.SmallInteger)
else 'B' if isinstance(t2, sqltypes.BigInteger) else 'I'
)
return t1_small_or_big != t2_small_or_big