Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Example shown for Upserts #2

Closed
satyajit-cliq opened this issue Jul 8, 2021 · 0 comments
Closed

Incorrect Example shown for Upserts #2

satyajit-cliq opened this issue Jul 8, 2021 · 0 comments

Comments

@satyajit-cliq
Copy link

data := []map[string]interface{}{
    {
        "uid": "uid(v)",
        "email": "user@company1.io",
        "name": "first name"
    },
}

userByEmailQuery := dqlx.Query(dqlx.EqFn("email", "user@company1.io")).
    .Select(`
        v as uid
        name
    `)

resp, err := db.Mutation().
    Query(userByEmailQuery).
    Set(data).
    Execute(ctx)

The above example does not work, as userByEmailQuery is of type dqlx.QueryBuilder and Query() needs dqlx.DQLizer

adityapandey9 pushed a commit to adityapandey9/dqlx that referenced this issue Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant