sunary / sqlize

powerful SQL toolkit; offering parsing, building, and migration capabilities.
Other
97 stars 11 forks source link

correct get index using map instead of find in slice #7

Closed sunary closed 3 years ago

sunary commented 3 years ago

Currently get id in map[string]int is correctness, so I'm finding in slice:

https://github.com/sunary/sqlize/blob/master/element/table.go#L150 and

https://github.com/sunary/sqlize/blob/master/element/table.go#L163

Help me correct this and able get id in map[string]int again.

peakle commented 3 years ago

i take this one)