Skip to content

Commit

Permalink
Merge pull request #112 from touchlab/qiaoyuang-main
Browse files Browse the repository at this point in the history
Qiaoyuang main
  • Loading branch information
kpgalligan committed Nov 5, 2023
2 parents ba4ff02 + 8968474 commit db3d704
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,18 @@ class NativeCursor(override val statement: NativeStatement) : Cursor {
override val columnNames: Map<String, Int> by lazy {
val map = HashMap<String, Int>(this.columnCount)
for (i in 0 until columnCount) {
map.put(columnName(i), i)
val key = columnName(i)
if (map.containsKey(key)) {
var index = 1
val basicKey = "$key&JOIN"
var finalKey = basicKey + index
while (map.containsKey(finalKey)) {
finalKey = basicKey + ++index
}
map[finalKey] = i
} else {
map[key] = i
}
}
map
}
Expand Down

0 comments on commit db3d704

Please sign in to comment.