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

How to create a table using a PgClient #49

Closed
omarsahl opened this issue Feb 9, 2018 · 1 comment
Closed

How to create a table using a PgClient #49

omarsahl opened this issue Feb 9, 2018 · 1 comment

Comments

@omarsahl
Copy link

omarsahl commented Feb 9, 2018

How do I execute a statement like this CREATE TABLE IF NOT EXISTS movies (id SERIAL, name varchar(100), release varchar(10)) using a PgClient?

@vietj
Copy link
Member

vietj commented Feb 9, 2018

you just execute a simple query:

client.query(myStatement, ar -> {
  if (ar.succeeded()) {
  } else {
    System.out.println("Failure: " + ar.cause().getMessage());
  }
});

@vietj vietj closed this as completed Feb 9, 2018
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

2 participants