| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
CreateCollation registers a Go function as a sqlite collation, similar to CreateFunction. These can be used in queries for custom sorting.
There was a problem hiding this comment.
Looks good. minor changes please:
Sorry, something went wrong.
|
|
||
| x := &xcollation{ | ||
| name: name, | ||
| conn: conn, |
There was a problem hiding this comment.
I don't think a collation ever needs to know its own conn actually.
Sorry, something went wrong.
| } | ||
|
|
||
| var xcollations = struct { | ||
| mu sync.Mutex |
There was a problem hiding this comment.
Please make this a sync.RWMutex
Sorry, something went wrong.
| xcollations.mu.Lock() | ||
| x := xcollations.m[int(ptr)] | ||
| xcollations.mu.Unlock() |
There was a problem hiding this comment.
| xcollations.mu.Lock() | |
| x := xcollations.m[int(ptr)] | |
| xcollations.mu.Unlock() | |
| xcollations.mu.RLock() | |
| x := xcollations.m[int(ptr)] | |
| xcollations.mu.RUnlock() |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.