Skip to content

SQLite samples

xcesco edited this page Nov 30, 2017 · 5 revisions

Just to better understand how Kripton ORM works, a sample project was created here.

You can simply navigate in the androidTests to run test or sample and see Kripton at work. Every kind of sample has its directory under src/androidTest/java and src/main/java. Almost all sample generate log for monitoring SQL operations simply with logcat.

01. Constraints

Show how to simply create two model object and its two dao interfaces. Code is [here]. You can also see how to declare a primary key, with or without annotation. Al last, you will found how to make JOIN between two table, and select only value contained in model object associated to the dao interface. See

02. Compact SQL

In this sample it is tested how Kripton allows to define SQL simply defining needed parts of SQL and not all the entire SQL statemtents. This kind of SQL is called compact mode. SQL is defined using classes and attributes name instead of table and column names.

Table of Contents

Query definition

Features

Relations

Multithread supports

Modularization

Annotations for data convertion

Annotations for SQLite ORM

Annotations for shared preferences

Clone this wiki locally