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

feat:DIY SQL support return sql.Result/sql.Row/sql.Rows #752

Merged
merged 7 commits into from
Feb 2, 2023
Merged

Conversation

idersec
Copy link
Collaborator

@idersec idersec commented Feb 2, 2023

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

User Case Description

// AddUser
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser(name string, age int)(gen.SqlResult, error)

// AddUser1
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser1(name string, age int)(gen.RowsAffected, error)

// AddUser2
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser2(name string, age int) gen.RowsAffected

// AddUser3
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser3(name string,age int) gen.SqlResult

// AddUser4
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser4(name string, age int) gen.SqlRow

// AddUser5
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser5(name string, age int) gen.SqlRows

// AddUser6
//
// INSERT INTO users (name, age) VALUES (@name,@age) ON DUPLICATE KEY UPDATE age=VALUES(age)
AddUser6(name string, age int)(gen.SqlRows, error)

@tr1v3r tr1v3r merged commit c5b4756 into master Feb 2, 2023
@tr1v3r tr1v3r deleted the sqlResult branch March 8, 2023 03:23
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

Successfully merging this pull request may close these issues.

2 participants