Open corporatepiyush opened 7 years ago
No. Noone asked for that, so there are no such dialects in Exposed. I mark this issue as a feature request, but can't give you any estimates.
We are running against Cockroach using PostgreSQL drivers and things are fine. You may need to write code to automagically retry, as Cockroach bails out of many more transactions than Postgres
I'm trying to run our Postgres app against Cockroach. Not much success at the moment. Currently having problems with altering columns, altering columns with an index ~and collation~. EDIT: Collation not precisly an exposed issue.
Is there any progress in adding google cloud spanner support? I would like to help if it is possible.
@matheusfrancisco feel free to publish a PR with the GC Spanner support. Please use https://github.com/GoogleCloudPlatform/cloud-spanner-emulator for tests.
Is there any progress in adding google cloud spanner support? I would like to help if it is possible.
Hi @matheusfrancisco, any news on this? I am also interested in exposed and Google cloud spanner support and could potentially help if there is an on going effort, if needed!
+1 - would be great to see VendorDialect
for com.google.cloud.spanner.jdbc.JdbcDriver
FWIW, Database.registerJdbcDriver("jdbc:cloudspanner", "com.google.cloud.spanner.jdbc.JdbcDriver", PostgreSQLDialect.dialectName)
probably gets something which is mostly functional for Cloud Spanner in the interim
Attempting that workaround gives:
com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory$JdbcSqlFeatureNotSupportedException: Only isolation level TRANSACTION_SERIALIZABLE is supported
We can specify the transaction level but then get
Caused by: com.google.cloud.spanner.SpannerException: INVALID_ARGUMENT: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Unsupported concurrency mode in query using INFORMATION_SCHEMA. - Statement: 'SELECT TABLE_CATALOG AS "TABLE_CAT", ...
Googling suggests setting auto-commit mode will help, but then my final attempt:
fun <T> dbTransaction(statement: Transaction.() -> T): T {
return transaction(transactionIsolation = Connection.TRANSACTION_SERIALIZABLE, repetitionAttempts = 1, db = db) {
connection.autoCommit = true
statement()
}
}
fails with
01:27:41.195 [main] WARN Exposed - Transaction rollback failed: database in auto-commit mode. See previous log line for statement
java.sql.SQLException: database in auto-commit mode
Is it compatible with Google Cloud Spanner and CockroachDB ?