Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hfhbd
Copy link
Collaborator

@hfhbd hfhbd commented Mar 28, 2023

Another PR regarding the VerifyMigrationTask and its classpath... this time reusing the ConnectionManager and its existing dialect api.

import java.sql.*

class FooDialect : SqlDelightDialect by SqliteDialect() {
override val connectionManager: ConnectionManager = object: ConnectionManager by SqliteConnectionManager() {
Copy link
Collaborator Author

@hfhbd hfhbd Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would only need these 10 lines, the existing lines from FooDialect are unrelated to your use-case.

Copy link
Collaborator

@AlecKazakova AlecKazakova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right, the connection manager a dialect provides is essentially only to support all the IDE functionality that would use an active db connection. The connection used to verify migrations is only ever useful for SQLite since thats the only place where it even makes sense to have separate fresh/migration schemas that have to be compared.

@AlecKazakova
Copy link
Collaborator

or to put another way, the connection used to run queries from the IDE is never going to be the same as the one used to verify migrations, so I don't think theres any value in trying to share that connection

@hfhbd
Copy link
Collaborator Author

hfhbd commented Mar 29, 2023

Okay, was just an idea to reduce the api.

@hfhbd hfhbd closed this Mar 29, 2023
@hfhbd hfhbd deleted the hfhbd/schemacrawler branch March 29, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants