We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation .
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
1.22
2.7.0
Option Yes
1.?Scan的??是指?的?候,也就是*Result,?有??到?据,返回sql.ErrNoRows
var results Result q := g . DB ( "default" ). Model ( "results" ). Where ( "1!=1" ) err := q . Scan ( & results ) fmt . Println ( "err=" , err )
var results * Result q := g . DB ( "default" ). Model ( "results" ). Where ( "1!=1" ) err := q . Scan ( & results ) fmt . Println ( "err=" , err )
3.?Scan的??是*[]Result或者*[]*Result的?候,?有??到?据,?有返回sql.ErrNoRows
var results [] * Result q := g . DB ( "default" ). Model ( "results" ). Where ( "1!=1" ) err := q . Scan ( & results ) fmt . Println ( "err=" , err )
建??一返回??,或者不返回??比?好点
err= sql: no rows in result set err= nil err= nil
err= nil err= nil err= nil
或者 err= sql: no rows in result set err= sql: no rows in result set err= sql: no rows in result set
The text was updated successfully, but these errors were encountered:
No branches or pull requests