Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

rainu/dbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dbc

[EN]

Database-Container. Collection implementations that store data into a database.

License

Database-Container is distributed under the The MIT License.

Maven Integration

If you want to add Database-Container to your maven project, you can add the following dependency in your pom.xml:

<dependency>
	<groupId>de.raysha.lib</groupId>
	<artifactId>dbc</artifactId>
	<version>2.0</version>
</dependency>

TODO

How to build:

  • Install maven (i use version 2)
  • go into the project root-directory
  • execute the following command:
    mvn clean install
How to use:
Example 1:

import de.rainu.lib.dbc.DBMap; import de.rainu.lib.dbc.beans.ConnectionInfo; ... ConnectionInfo info = new ConnectionInfo( "org.h2.Driver", "jdbc:h2:/tmp/dbc", "sa", ""); Map<String, String> map = new DBMap(info);

map.put("key", "value"); ...


[DE]
Database-Container.
DBC ist ein Projekt indem die Java-Basis-Collections (Map, List, Set) so implementiert werden, dass sie ihre Daten nicht in den Speicher, sondern in eine Datenbank hinterlegen. Dazu wird die JDBC-Schnittstelle verwendet.

Ziel:
Datenbanklogik hinter der Implementierung "verstecken", sodass man möglichst leicht in einem bestehenden Projekt die Collection-Implementierung austauschen kann.

Prioritäten:
  • Schnelligkeit - Sodass die Gesamtperformance eines Projektes nicht ausgebremst wird
Bau-Anleitung:
  • Installiere maven (ich benutze Version 2)
  • Wechsel in das Projekt-Verzeichnis
  • führe folgendes Kommando aus:
    mvn clean install
Benutzung:
Beispiel 1:

import de.rainu.lib.dbc.DBMap; import de.rainu.lib.dbc.beans.ConnectionInfo; ... ConnectionInfo info = new ConnectionInfo( "org.h2.Driver", "jdbc:h2:/tmp/dbc", "sa", ""); Map<String, String> map = new DBMap(info);

map.put("key", "value"); ...

About

Database-Container. Collection implementations that store data into a database.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages