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

chore: docs: EXPOSED-661 Support non-H2 compatible queries in the exposed-dsl snippets project #2329

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

vnikolova
Copy link
Collaborator

Description

Added SQLite and MySQL database configurations to the exposed-dsl project, used to run the following queries:

SQLite:

  • insertIgnore
  • insertIgnoreAndGetId

MySQL:

  • deleteIgnoreWhere
  • join update
  • join delete
  • query with index hint

Type of Change

  • Documentation update

Related Issues

EXPOSED-661

@vnikolova vnikolova requested a review from bog-walk December 6, 2024 15:35
@vnikolova vnikolova self-assigned this Dec 6, 2024
Comment on lines +56 to +59
transaction(mysqlDb) {
addLogger(StdOutSqlLogger)
SchemaUtils.create(StarWarsFilmsIntIdTable)
SchemaUtils.create(ActorsIntIdTable)
Copy link
Member

Choose a reason for hiding this comment

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

This comment is only relevant for MySQL, as the other 2 databases being used are in-memory and should be fully discarded when the app stops running. It also may only become relevant with more complex examples and/or if the exposed-dsl is run multiple times in a row using MySQL.

I haven't tested this locally with MySQL to see if it could eventually become a problem, but I'd consider dropping any created tables when you're done using the database, for example at the end of the transaction. Mostly because I'm not 100% sure if the database (and all its objects) are discarded when the app stops, as this may be dependent on how MySQL is set up locally. Cleaning up any resources that we're done with would ensure no future debugging issues if more examples are run on this database.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the tip. At the moment there doesn't seem to be an issue with running the examples locally even though the database tables are not discarded.

@vnikolova vnikolova merged commit 6bbceb4 into main Dec 10, 2024
5 checks passed
@vnikolova vnikolova deleted the vnikolova/EXPOSED-661 branch December 10, 2024 09:54
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

Successfully merging this pull request may close these issues.

2 participants