Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
<html>
<head>
<title>NuoDB | Ebean ORM</title>
<meta name="layout" content="_layout2/base-docs.html"/>
<meta name="bread1" content="Database platforms" href="/docs/database"/>
<meta name="bread2" content="NuoDB" href="/docs/database/nuodb"/>
<#assign n0_docs="active">
<#assign n1_platforms="active">
<#assign n2_nuodb="active">
</head>
<body>
<h2>NuoDB</h2>
<h3>Testing</h3>
<p>
To test against NuoDB docker test container set the <em>platform</em> to <code>postgres</code> in
<code>src/test/resources/application-test.yaml</code>
</p>
<p>
Refer to <a href="/docs/testing">docs / testing</a> if application-test.yaml doesn't exist yet.
</p>
<pre content="yml">
ebean:
test:
platform: nuodb # h2, nuodb, postgres, ...
ddlMode: dropCreate # none | dropCreate | migrations
dbName: my_app
</pre>
<h2 id="ebean-nuodb">ebean-nuodb dependency</h2>
<p>
We can use the <code>io.ebean:ebean-nuodb</code> dependency rather than <code>io.ebean:ebean</code> if we want to only
bring in the NuoDB specific platform code. Depending on <code>io.ebean:ebean</code> will bring in all platforms.
</p>
<h2 id="types">Types</h2>
<h5>UUID</h5>
<p>
NuoDB does not have a native UUID type. Instead this will be mapped to database <em>binary(16)</em> or
<em>varchar(40)</em> based on the setting of PlatformConfig.DbUuid.
</p>
<h5>Array types</h5>
<p>
NuoDB does not have array types and these types are instead simulated.
</p>
<h5>JSON</h5>
<p>
Properties with <code>@DbJson</code> and <code>@DbJsonB</code> are mapped to database varchar or clob.
</p>
<h2 id="history">History support</h2>
<p>
History support for NuoDB is provided by generating triggers and history table.
</p>
<h2 id="partitioning">Table Partitioning</h2>
<p>
NuoDB supports table partitioning but this is not supported by Ebean yet (via <em>@DbPartition</em>).
</p>
<h2 id="starting">Docker container</h2>
<p>
We can programmatically start a docker container version of NuoDB.
</p>
<p>
The below uses <code>ebean-test-docker</code> dependency which already comes with <code>ebean-test</code>.
If we do not have a dependency on <code>ebean-test</code> then add <code>io.ebean:ebean-test-docker:5.0</code>
as a dependency.
</p>
<pre content="java">
package main;
import io.ebean.docker.commands.NuoDBContainer;
public class Main {
public static void main(String[] args) {
NuoDBContainer container = NuoDBContainer.newBuilder("4.0")
.schema("my_app")
.user("my_app")
.password("test")
.build();
container.start();
}
}
</pre>
<@next_edit "ElasticSearch" "/docs/database/elasticsearch" "/docs/database/nuodb/index.html"/>
</body>
</html>