Oracle native BOOLEAN guide - #1865
Open
radovanradic wants to merge 6 commits into
Open
radovanradic wants to merge 6 commits into
radovanradic wants to merge 6 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
micronaut-data-oracle-booleanguide (Java, Kotlin, Groovy). It shows how to map Javabooleanproperties to native OracleBOOLEANcolumns (Oracle Database 23.1+ / 26ai) with Micronaut Data JDBC 5.2.Example
A small task list where each task has a
completedflag.@JdbcRepository(dialect = Dialect.ORACLE, version = "23.1")with:findByCompletedTrue()/findByCompletedFalse(), which generateIS TRUE/IS FALSEfindByCompleted(boolean), which binds the value as a JDBCBOOLEANupdateCompleted(id, completed)datasources.default.dialect-options.version=23.1, so schema generation createsBOOLEANinstead ofNUMBER(1). Test Resources usesgvenzl/oracle-free:latest.Guide explains
micronaut.data.sql.dialect-options.oracle.version, with a snippet for each build (Gradle Java/Kotlin/Groovy, Maven Java/Groovy)@JdbcRepository(version = ...)on a single repository, which takes precedence over the build-wide optionNUMBER(1)/= 1mapping used when no version is setTesting
./gradlew micronautDataOracleBooleanBuild -x micronautDataOracleBooleanRunNativeTestScriptpassesUSER_TAB_COLUMNSreportsBOOLEANfor the columnversionremoved from the repository, the compiled queries useIS TRUEmicronaut-data-oracle-boolean-gradle-groovy.pdf
micronaut-data-oracle-boolean-gradle-java.pdf
micronaut-data-oracle-boolean-gradle-kotlin.pdf
micronaut-data-oracle-boolean-maven-groovy.pdf
micronaut-data-oracle-boolean-maven-java.pdf
micronaut-data-oracle-boolean-pyronaut-python.pdf