Popularity
2.7
Declining
Activity
3.9
-
137
6
5

Description

Persism is a wood simple, auto discovery, auto configuration, and convention over configuration ORM (Object Relational Mapping) library for Java.

Programming language: TSQL
License: BSD 3-clause "New" or "Revised" License
Tags: Database     ORM     Java     Library     Projects    
Latest version: v1.1.0

Persism alternatives and similar libraries

Based on the "ORM" category.
Alternatively, view Persism alternatives based on common mentions on social networks and blogs.

  • Mybatis-Plus

    An powerful enhanced toolkit of MyBatis for simplify development
  • APIJSON

    🏆 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 🏆 A JSON Transmission Protocol and an ORM Library 🚀 provides APIs and Docs without writing any code.
  • Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
    Promo www.influxdata.com
    InfluxDB Logo
  • greenDAO

    greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
  • Afinal

    Afinal是一个android的ioc,orm框架,内置了四大模块功能:FinalAcitivity,FinalBitmap,FinalDb,FinalHttp。通过finalActivity,我们可以通过注解的方式进行绑定ui和事件。通过finalBitmap,我们可以方便的加载bitmap图片,而无需考虑oom等问题。通过finalDB模块,我们一行代码就可以对android的sqlite数据库进行增删改查。通过FinalHttp模块,我们可以以ajax形式请求http数据。详情请通过以下网址查看。
  • Sqli

    orm sql query builder, API: QB, QB.X, QrB
  • Morphia

    MongoDB object-document mapper in Java based on https://github.com/mongodb/mongo-java-driver
  • MyBatis-Flex

    mybatis-flex is an elegant Mybatis Enhancement Framework
  • ObjectiveSql

    Writing SQL using Java syntax
  • SQL-Toy

    Java真正智慧的ORM框架,融合JPA功能和最佳的sql编写及查询模式、独创的缓存翻译、最优化的分页、并提供无限层级分组汇总、同比环比、行列转换、树形排序汇总、sql自适配不同数据库、分库分表、多租户、数据加解密、脱敏以及面向复杂业务和大规模数据分析等痛点、难点问题项目实践经验分享的一站式解决方案!
  • Bean Searcher

    🔥🔥🔥 A read-only ORM focusing on advanced query, naturally supports joined tables, and avoids DTO/VO conversion, making it possible to realize complex query in one line of code !
  • MyBatis-Plus-Join

    支持连表查询的mybatis-plus,mybatis-plus风格的连表操作提供wrapper.leftJoin(),wrapper.rightJoin()等操作
  • Fluent-Mybatis

    No description, website, or topics provided.
  • Bee

    Bee is an AI, easy and high efficiency ORM framework,support JDBC,Cassandra,Mongodb,Sharding,Android,HarmonyOS.
  • HsWeb-ORM

    简单的orm工具,为动态表单而生
  • Android Orma

    An ORM for Android with type-safety and painless smart migrations
  • Doma 2

    DAO oriented database mapping framework for Java 8+
  • Easy-Query

    java/kotlin high performance lightweight solution for jdbc query,support oltp and olap query,一款java下面支持强类型、轻量级、高性能的ORM,致力于解决jdbc查询,拥有对象模型筛选、隐式子查询、隐式join
  • Permazen

    Language-Natural Persistence Layer for Java
  • Eclipse JNoSQL

    Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
  • Ebatis

    ORM Framework for Elasticsearch
  • Eclipse Store

    High-Performance Java-Native-Persistence. Store and load any Java Object Graph or Subgraphs partially, Relieved of Heavy-weight JPA. Microsecond Response Time. Ultra-High Throughput. Minimum of Latencies. Create Ultra-Fast In-Memory Database Applications & Microservices.
  • Ebean

    Provides simple and fast data access.

Do you think we are missing an alternative of Persism or a related project?

Add another 'ORM' Library

README

[](logo1.png) [Release notes](release-notes.md)

Welcome

Persism is a wood simple, auto discovery, auto configuration, and convention over configuration ORM (Object Relational Mapping) library for Java.

<dependency>
    <groupId>io.github.sproket</groupId>
    <artifactId>persism</artifactId>
    <version>1.1.0</version>
</dependency>
Connection con = DriverManager.getConnection(url, username, password);

// Instantiate a Persism session object with the connection
Session session = new Session(con);

List<Customer> list = session.query(Customer.class,"select * from Customers where name = ?", "Fred");
// or
List<Customer> list = session.query(Customer.class, "sp_FindCustomers(?)", "Fred");

Customer customer;
customer = session.fetch(Customer.class, "select * from Customers where name = ?", "Fred");
// or   customer = session.fetch(Customer.class, "sp_FindCustomer(?)", "Fred");
if (customer != null) {
    // etc...
}

// fetch an existing instance
Customer customer = new Customer();
customer.setCustomerId(123);
if (session.fetch(customer)) {
    // customer found and initialized
} 

// Supports basic types
String result = session.fetch(String.class, "select Name from Customers where ID = ?", 10);

// Fetch a count as an int - Enums are supported 
int count = session.fetch(int.class, "select count(*) from Customers where Region = ?", Region.West);

// Insert - get autoinc
Customer customer = new Customer();
customer.setCustomerName("Fred");
customer.setAddress("123 Sesame Street");

session.insert(customer); 

// Inserted and new autoinc value assigned 
assert customer.getCustomerId() > 0

// Updates
customer.setCustomerName("Barney");
sesion.update(customer); // Update Customer   

Simple

The API for Persism is small. Mostly you just need a Connection and a Persism Session object, and you're good to go. Your POJOs can have optional annotations for table and column names and can optionally implement a Persistable interface for where you need to track changes to properties for UPDATE statements.

Auto-Discovery

Persism figures things out for you. Create a table, write a JavaBean, run a query. Persism uses simple mapping rules to find your table and column names and only requires an annotation where it can’t find a match.

Convention over configuration

Persism requires no special configuration. Drop the JAR into your project and go.

Persism has annotations though they are only needed where something is outside the conventions. In most cases you probably don't even need them.

Persism can usually detect the table and column mappings for you including primary/generated keys and columns with defaults.

Smart

Persism will do the correct thing by default. Persism understands that your class is called Customer and your table is called CUSTOMERS. It understands that your table column is CUSTOMER_ID and your property is customerId.

Persism understands when your class is called Category and your table is called CATEGORIES. No problem. No need to annotate for that. Persism uses annotations as a fall back – annotate only when something is outside the conventions.

Tiny

Persism is under 70k. Yeah, fit it on a floppy if you want. Persism has Zero dependencies however it will utilize logging based on whatever is available at runtime - SLF4J, LOG4J or JUL.

Have a look here for the getting started guide, code coverage and Javadoc

Compile

To run tests only basic tests: in memory databases (H2, HSSQL, Derby) + sqlite (faster)

mvn clean test

To run basic tests + testContainers based tests (postgresql, mysql, mariadb, firebird). Need docker installed.

mvn clean test -P include-test-containers-db

To run tests for every supported database. Needs Oracle up and running

mvn clean test -P all-db

To generate surefire reports with every database but Oracle (in target/site/surefire-report.html)

mvn clean test surefire-report:report -P include-test-containers-db

Thanks!