-
Notifications
You must be signed in to change notification settings - Fork 700
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
Postgresql support in Exposed #1
Comments
👍 for that one, supporting MySQL/PostgreSQL/H2 databases would cover most user needs I guess. |
Tapac
added a commit
that referenced
this issue
Sep 5, 2016
Tapac
added a commit
that referenced
this issue
May 10, 2017
Tapac
added a commit
that referenced
this issue
Mar 22, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
we are trying to make Exposed work with Postgresql... looks like the select and insert queries work, but the creat methods fail due to "show tables" commnad that is not supported...
Postgresql needs some other command for finding the existing tables...
can you please help, Thanks.
ok, fixef it, don't know if it's right but:
fun Table.exists (): Boolean {
val tableName = this.tableName
var sql = "show tables"
var resultSet:java.sql.ResultSet? = null
if (Session.get().vendor == DatabaseVendor.PostgreSQL) {
sql = "SELECT tablename FROM pg_catalog.pg_tables"
}
resultSet = Session.get().connection.createStatement()?.executeQuery(sql)
}
The text was updated successfully, but these errors were encountered: