Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Reactive Data Access

License

NotificationsYou must be signed in to change notification settings

Sanne/hibernate-reactive

 
 

Repository files navigation

Hibernate logo

CI StatusLicenseDownload

Hibernate Reactive

A reactive API forHibernate ORM, supporting non-blocking databasedrivers and a reactive style of interaction with the database.

Hibernate Reactive may be used in any plain Java program, but isespecially targeted toward usage in reactive environments likeQuarkus andVert.x.

CurrentlyPostgreSQL,MySQL,MariaDB, andDb2 aresupported.

Learn more athttp://hibernate.org/reactive.

Compatibility

Hibernate Reactive has been tested with:

Support for SQL Server is coming soon.

Documentation

TheIntroduction to Hibernate Reactive coverseverything you need to know to get started, including:

We recommend you start there!

Examples

The directoryexamples contains several small projects showingdifferent features of Hibernate Reactive:

Quarkus quickstarts

A list ofquickstarts for Quarkus is available on GitHub:

Or you cangenerate a new Quarks projectthat uses the Hibernate Reactive extension and start coding right away.

Gradle build

The project is built with Gradle, but you donot need to have Gradleinstalled on your machine.

Building

To compile this project, navigate to thehibernate-reactive directory,and type:

./gradlew compileJava

To publish Hibernate Reactive to your local Maven repository, run:

./gradlew publishToMavenLocal

Building documentation

To build the API and Reference documentation type:

./gradlew assembleDocumentation

You'll find the generated documentation in the subdirectoryrelease/build/documentation.

open release/build/documentation/reference/html_single/index.htmlopen release/build/documentation/javadocs/index.html

Running tests

To run the tests, you'll need to decide which RDBMS you want to testwith, and then get an instance of the test database running on yourmachine.

By default, the tests will be run against PostgreSQL. To test againstMySQL, MariaDB, or Db2, you must explicitly specify-Pdb=mysql,-Pdb=maria, or-Pdb=db2, for example:

./gradlew test -Pdb=db2

It's also possible to run all tests or only selected tests onall available databases:

./gradlew testAll -PincludeTests=DefaultPortTest

the propertyincludeTests represents the name of the test to runand can contain the wildcard '*'. The property is optional butrunning all tests on all databases might take a lot of time.

There are three ways to start the test database.

If you have Docker installed

If you have Docker installed, running the tests is really easy. Youdon't need to create the test databases manually. Just type:

./gradlew test -Pdocker

Or:

./gradlew test -Pdocker -Pdb=mysql

Or:

./gradlew test -Pdocker -Pdb=maria

Or:

./gradlew test -Pdocker -Pdb=db2

The tests will run faster if you reuse the same containers acrossmultiple test runs. To do this, edit the testcontainers configurationfile.testcontainers.properties in your home directory, adding thelinetestcontainers.reuse.enable=true. (Just create the file if itdoesn't already exist.)

If you already have PostgreSQL installed

If you already have PostgreSQL installed on your machine, you'll justneed to create the test database. From the command line, type thefollowing commands:

psqlcreate database hreact;create user hreact with password 'hreact';grant all privileges on database hreact to hreact;

Then run./gradlew test from thehibernate-reactive directory.

If you already have MySQL installed

If you have MySQL installed, you can create the test database usingthe following commands:

mysql -urootcreate database hreact;create user hreact identified by 'hreact';grant all on hreact.* to hreact;

Then run./gradlew test -Pdb=mysql from thehibernate-reactivedirectory.

If you have Podman

If you havePodman installed, you can start the testdatabase by following the instructions inpodman.md.

Limitations

We're working hard to support the full feature set of Hibernate ORM.At present several minor limitations remain.

  • Automatic update or validation of an existing database schema requireuse of JDBC.
  • The annotation@org.hibernate.annotations.Source fordatabase-generated@Version properties is not yet supported.
  • The annotation@org.hibernate.annotations.CollectionId is not yetsupported.

About

Reactive Data Access

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java100.0%

[8]ページ先頭

©2009-2025 Movatter.jp