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

Support go1.23 iterators #7192

Open
ilya-hontarau opened this issue Sep 9, 2024 · 0 comments
Open

Support go1.23 iterators #7192

ilya-hontarau opened this issue Sep 9, 2024 · 0 comments
Assignees
Labels
type:feature_request feature request

Comments

@ilya-hontarau
Copy link

ilya-hontarau commented Sep 9, 2024

Describe the feature

Allow to pass iterators in methods:

db.Delete(&User, "name  IN (?)", maps.Keys(namesToIDs))

users := []User{{Name: "jinzhu1"}, {Name: "jinzhu2"}, {Name: "jinzhu3"}}
err = db.Create(slices.Values(users)).Error

not it returns errors:

panic: failed to encode args[0]: unable to encode (iter.Seq[string])(0x102f20cf0) into text format for text (OID 25): cannot find encode plan

or 

panic: unsupported data type: iter.Seq[main.Test]: Table not set, please set it like: db.Model(&user) or db.Table("users")

Motivation

Support new go standard library features.

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request feature request
Projects
None yet
Development

No branches or pull requests

2 participants