-
Notifications
You must be signed in to change notification settings - Fork 16
Features
xcesco edited this page Oct 6, 2018
·
30 revisions
Kripton was built with the following objectives:
- Create provide a simple and coherent way to persist data independently if you want to store data on file, on an SQLite database, on a SharedPreferences or data arrived by REST web service.
- Work at max speed: I want to realize the best (or one of them) persistence library in terms of speed to persist on. You can see benchmarks page to have more information about performance. This is obtained with the use of the annotation processor.
- Support the highest number of possible formats: JSON, XML, YAML, CBOR, (Java) properties, SQLite and SharedPreferences.
- Persist on SQLite in very easy way: for who known SQL and don't like write to write it and boilerplate-code to support it, Kripton IS the right library.
Kripton has some runtime-libraries (for Android platform, for Java platform) and a Java annotation processor library. Annotation processor generates code which is based on runtime libraries: kripton-android-library
and kripton-library
.
- All primitive types (bool, int, long, float, etc..)
- All simple types (Boolean, String, Byte, Float, Integer, etc..)
- List collections: if you use List interface, an ArrayList will be used.
- Set collections: if you use Set interface, a HashSet will be used.
- Map collections: if you use Map interface, an HashLinkedMap will be used.
- BigDecimal, BigInteger, Calendar, Currency, Locale, Time, TimeZone, Url
- Array collections
- POJO bean type with @BindType annotation
- Virtually every kind of other type thanks to type adapter you can define and use.
Supported persistence methods are:
- data format XML (since 1.0.0)
- data format JSON (since 1.0.0)
- data format YAML (since 1.5.0)
- data fromat CBOR (since 1.5.0)
- data (java) properties (since 1.5.0)
- data format SMILE (since 2.0.0)
- SQLite (since 1.2.0).
- Shared preferences (since 1.2.0).
- Java
- Kotlin
Supported platforms:
- Android 4.x+ (since 1.0.0)
- Generic Java 8 platform (since 5.0.0)
Kripton has some limitations and constraints:
- No cyclic support: it's not possible to bind object with cyclic references.
- In SQLite tables need to have a long primary key.
- DAOs can extract only fields of the associated table: it's possible to define complex queries, but only associated table's field can be used as a result.
If you like my library and you want to support me on develop it:
- Introduction
- Goals & Features
- Kotlin
- Immutable or Mutable Pojo
- Annotation Processor Args
- Credits
- Articles
- Benchmarks
- Setup
- Tutorial
- Usage
- Dependencies and inspirations
- Stackoverflow
- Documentation
- SQL logging
- Data source options
- Indices
- SQL Type adapter
- Global SQL Type adapter
- Constraints
- Live data: welcome Architectural components!!
- Paged Live data
- Dynamic parts
- Transactional and batch operations
- Async Transactional and batch operations
- Global transaction
- Support for immutable POJO
- Generate Content provider
- Generate Database schema generation
- Database migration
- BindSqlColumn
- BindContentProvider
- BindContentProviderEntry
- BindContentProviderPath
- BindDao
- BindDaoMany2Many
- BindDataSource
- BindDataSourceOptions
- BindDataSourceUpdateTask
- BindIndex
- BindSqlRelation
- BindSqlAdapter
- BindSqlChildSelect
- BindSqlDelete
- BindSqlDynamicOrderBy
- BindSqlDynamicWhere
- BindSqlDynamicWhereParams
- BindSqlInsert
- BindSqlPageSize
- BindSqlParam
- BindSqlSelect
- BindSqlUpdate
- BindSqlType
- BindSqlTransaction