https://github.com/pgassmann/universal-db
UniversalDB - ultra fast TeamApps database
https://github.com/pgassmann/universal-db
Last synced: 6 months ago
JSON representation
UniversalDB - ultra fast TeamApps database
- Host: GitHub
- URL: https://github.com/pgassmann/universal-db
- Owner: pgassmann
- License: apache-2.0
- Created: 2021-06-16T22:16:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-16T22:17:19.000Z (about 5 years ago)
- Last Synced: 2025-02-06T22:32:42.417Z (over 1 year ago)
- Size: 726 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# UniversalDB
An ultra fast embedded persisting in-memory database:
* Easy and intuitive API through generated POJOs
* Integrated full text search - including complex joins
* Integrated file storage - either local or S3 compatible storage with AWS or min.io
* File parsing and full text indexing
### Setting up the dependencies
Current UniversalDB version: [](https://maven-badges.herokuapp.com/maven-central/org.teamapps/universal-db)
```xml
org.teamapps
universal-db
0.4.11
```
## Build configuration
Add this to your pom.xml:
```xml
org.teamapps
universal-db-maven-plugin
1.2
generate-sources
generate-model
${project.basedir}/src/main/model
Model
```
## Create UniversalDB schema
Add a source folder e.g. `/src/main/model` and create a model class e.g. `Model` with the model you want to use:
```java
import org.teamapps.universaldb.Database;
import org.teamapps.universaldb.Schema;
import org.teamapps.universaldb.SchemaInfoProvider;
import org.teamapps.universaldb.index.Table;
public class Model implements SchemaInfoProvider {
public String getSchema() {
Schema schema = Schema.create();
Database database = schema.createDatabase("db");
Table table = database.createTable("table1");
Table table2 = database.createTable("table2");
table
.addText("text1")
.addText("text2")
.addTimestamp("timestamp")
.addEnum("enumValue", "value1", "value2", "value3")
.addInteger("number")
.addLong("bigNumber")
.addReference("reference", table2, true, "backRef");
table2
.addText("text")
.addReference("backRef", table, false, "reference");
return schema.getSchema();
}
}
```
After compiling you will have a Table and a Table2 class to work with.
## License
The UniversalDB maven plugin is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).