Harium Database SQLite

SQLite module to Harium Database

License

License

Harium Commercial License
Categories

Categories

SQLite Data Databases
GroupId

GroupId

com.harium.database
ArtifactId

ArtifactId

sqlite
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

Harium Database SQLite
SQLite module to Harium Database

Download sqlite

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
com.harium.database : ormlite jar 1.1.2
org.xerial : sqlite-jdbc jar 3.30.1
com.harium.database : core jar 1.0.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

database-sqlite

SQLite module to Harium Database

Maven Central

Example

import com.harium.database.dao.OrmLiteBaseDAOImpl;
import com.harium.database.sqlite.module.SQLiteDatabaseModule;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

public class Main {

    public static void main(String[] args) {
        SQLiteDatabaseModule module = new SQLiteDatabaseModule("database.sqlite");
        
        OrmLiteBaseDAOImpl<Pojo> dao = new OrmLiteBaseDAOImpl<Pojo>(Pojo.class);
        module.register(dao);
        boolean clearDatabase = true;
        module.init(clearDatabase);
        
        Pojo pojo = new Pojo();
        pojo.setText("Text 1");
        dao.create(pojo);
        
        Pojo created = dao.queryForId(1);
        System.out.println(created.getText());
    }

    @DatabaseTable(tableName = "pojo")
    public static class Pojo {

        @DatabaseField(generatedId = true)
        int id;

        @DatabaseField(columnName = "text")
        String text;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }
}
com.harium.database

Harium

Versions

Version
1.1.2
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0