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

if db.Exec encount an error, it can not continue other db.Exec #3

Closed
notedit opened this issue Mar 26, 2012 · 5 comments
Closed

if db.Exec encount an error, it can not continue other db.Exec #3

notedit opened this issue Mar 26, 2012 · 5 comments
Assignees

Comments

@notedit
Copy link

notedit commented Mar 26, 2012

No description provided.

@ghost ghost assigned bmizerany Mar 26, 2012
@bmizerany
Copy link
Contributor

Do you mind showing me some code to explain what this means; even if it's non-working code.

@notedit
Copy link
Author

notedit commented Mar 27, 2012

CREATE TABLE test (userid CHAR(10) UNIQUE NOT NULL);
  • rs,err := db.Exec("INSERT INTO test (userid) VALUES ('AAAA')")
  • rs,err := db.Exec("INSERT INTO test (userid) VALUES ('AAAA')")
  • rs,err := db.Exec("INSERT INTO test (userid) VALUES ('AAAAbb')")

there are three db.Exec in a go file. the second db.Exec will have an error,then the third db.Exec will have an error too.

@notedit
Copy link
Author

notedit commented Mar 27, 2012

i know , the state.Exec did not handle the 'E'.

i will try to fix it if i have time.

@bmizerany
Copy link
Contributor

Ok. I'll take a look tomorrow. Thank you.

On Mar 26, 2012, at 8:44 PM, noteditreply@reply.github.com wrote:

i know , the state.Exec did not handle the 'E'.

i will try to fix it if i have time.


Reply to this email directly or view it on GitHub:
bmizerany/pq#3 (comment)

@notedit
Copy link
Author

notedit commented Mar 27, 2012

i just dit not figure it out.

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

3 participants