Mercurial > gemma
comparison pkg/models/isrs.go @ 4060:15c9d4064f0f
AGM import: Mixed deletes with insert and updates to have them sorted by ISRS locations.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 25 Jul 2019 10:32:36 +0200 |
parents | 4a7c2140e44b |
children | 1222b777f51f |
comparison
equal
deleted
inserted
replaced
4059:07d853f9bf47 | 4060:15c9d4064f0f |
---|---|
42 *isrs = *in | 42 *isrs = *in |
43 return nil | 43 return nil |
44 } | 44 } |
45 | 45 |
46 func (isrs *Isrs) Less(other *Isrs) bool { | 46 func (isrs *Isrs) Less(other *Isrs) bool { |
47 if isrs.Hectometre < other.Hectometre { | |
48 return true | |
49 } | |
50 if isrs.Hectometre > other.Hectometre { | |
51 return false | |
52 } | |
53 if isrs.CountryCode < other.CountryCode { | 47 if isrs.CountryCode < other.CountryCode { |
54 return true | 48 return true |
55 } | 49 } |
56 if isrs.CountryCode > other.CountryCode { | 50 if isrs.CountryCode > other.CountryCode { |
57 return false | 51 return false |
67 } | 61 } |
68 if isrs.FairwaySection > other.FairwaySection { | 62 if isrs.FairwaySection > other.FairwaySection { |
69 return false | 63 return false |
70 } | 64 } |
71 if isrs.Orc < other.Orc { | 65 if isrs.Orc < other.Orc { |
66 return true | |
67 } | |
68 if isrs.Orc > other.Orc { | |
69 return false | |
70 } | |
71 if isrs.Hectometre < other.Hectometre { | |
72 return true | 72 return true |
73 } | 73 } |
74 return false | 74 return false |
75 } | 75 } |
76 | 76 |