MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / Version

Class Version

test/orm/test_composites.py:1068–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066 graphs = cls.tables.graphs
1067
1068 class Version(cls.Comparable):
1069 def __init__(self, id_, version):
1070 self.id = id_
1071 self.version = version
1072
1073 def __composite_values__(self):
1074 return (self.id, self.version)
1075
1076 __hash__ = None
1077
1078 def __eq__(self, other):
1079 return (
1080 isinstance(other, Version)
1081 and other.id == self.id
1082 and other.version == self.version
1083 )
1084
1085 def __ne__(self, other):
1086 return not self.__eq__(other)
1087
1088 class Graph(cls.Comparable):
1089 def __init__(self, version):

Callers 4

_fixtureMethod · 0.70
test_get_by_compositeMethod · 0.70
test_pk_mutationMethod · 0.70
test_null_pkMethod · 0.70

Calls

no outgoing calls

Tested by 4

_fixtureMethod · 0.56
test_get_by_compositeMethod · 0.56
test_pk_mutationMethod · 0.56
test_null_pkMethod · 0.56