klmr92 / uguu

Automatically exported from code.google.com/p/uguu
Other
0 stars 1 forks source link

Sorting the shares list #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
List of shares must be sorted by name
Since sorting by name is hard and postgres OFFSET works bad, there
should be some linear ordering without gaps in the shares table
We already have a share_id why not to use it in such a way.

Best way is to have postgres triggers to handle this task. Otherwise
it's up to lookup engine to keep shares sorted, but for share removing a
crazy admin would have to do some unintuitive work, which is bad.

Original issue reported on code.google.com by ruslan.savchenko on 29 Jan 2010 at 1:21

GoogleCodeExporter commented 9 years ago
Not so easy.

I'm afraid we have to store total number of shares in network table and 
netshare_id
in shares (list of shares in network sorted by hostname, protocol, port)

Original comment by ruslan.savchenko on 31 Jan 2010 at 11:07

GoogleCodeExporter commented 9 years ago
trigger-based implementation was a foil.

closed.

Original comment by ruslan.savchenko on 4 Feb 2010 at 11:41