Skip to content

bug, index error #7

@chensanle

Description

@chensanle

when I used index like “create_time.seconds” as a cursor field to query data, the program can't get the correct next page token, see the source code:

cursorData[i] = bson.DocElem{Name: cf, Value: doc[cf]}

It just assign "create_index.seconds" to doc and matching doc map, I think it should be look like this:

if cf == "create_time.seconds" {
    sonM, _ := doc["create_time"].(bson.M)
    cursorData[i] = bson.DocElem{Name: cf, Value: sonM["seconds"]}
} else {
    cursorData[i] = bson.DocElem{Name: cf, Value: doc[cf]}
}

Just a example~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions