com.laamella:dtotabase

A very simple in memory database

Лицензия

Лицензия

Группа

Группа

com.laamella
Идентификатор

Идентификатор

dtotabase
Последняя версия

Последняя версия

1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

com.laamella:dtotabase
A very simple in memory database
Ссылка на сайт

Ссылка на сайт

https://github.com/laamella-gad/dtotabase
Система контроля версий

Система контроля версий

https://github.com/laamella-gad/dtotabase.git

Скачать dtotabase

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.laamella/dtotabase/ -->
<dependency>
    <groupId>com.laamella</groupId>
    <artifactId>dtotabase</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.laamella/dtotabase/
implementation 'com.laamella:dtotabase:1.2'
// https://jarcasting.com/artifacts/com.laamella/dtotabase/
implementation ("com.laamella:dtotabase:1.2")
'com.laamella:dtotabase:jar:1.2'
<dependency org="com.laamella" name="dtotabase" rev="1.2">
  <artifact name="dtotabase" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.laamella', module='dtotabase', version='1.2')
)
libraryDependencies += "com.laamella" % "dtotabase" % "1.2"
[com.laamella/dtotabase "1.2"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 23.5-jre

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Dtotabase

The most basic in-memory database in the world.

Why?

Because for test code I needed a data structure where I could easily store DTO's (or just any object) and get them out again in various ways with the least amount of hassle.

Of course, we have maps and lists and sets and everything, but this project treats DTO's more like database rows. You can do SELECT, INSERT, DELETE and UPDATE, by using functions. Hence "DTO Database."

It's incredibly basic, anybody could make it in an hour. Well, I saved you that hour.

Maven

Here it is: Maven Central

Usage

(This is all taken from the unit tests.)

Create a table

DtoTable<Address> addressTable = new DtoTable<>()

Subclass it if you like to add more methods.

Put some data in

addressTable.insert(address1, address2)

Duplicates (objects which are equals) will be ignored

Retrieve some data

Set<Address> selected = addressTable.select(r -> r.number > 50)

This is the big advantage of Dtotabase: quickly select data in any way you like with just a simple lambda expression.

Update some data

addressTable.update(
        address -> address.number > 50,
        address -> address.number *= 2)

Delete some data

addressTable.delete(r -> r.name.contains("lane"))

Support

There may not be much activity since this project is very small, but I do intend to support it. Do report issues when you like more features or find bugs.

com.laamella

Laamella Gad

Версии библиотеки

Версия
1.2
1.1
1.0