Honey
Bee is an AI, easy and high efficiency ORM framework,support JDBC,Cassandra,Mongodb,Sharding,Android,HarmonyOS. Honey is the implementation of the Bee.
Install / Use
/learn @automvc/HoneyREADME
Bee
Easy for Stronger.
Bee is an ORM framework.
Bee is an easy and high efficiency ORM framework.
Coding Complexity is O(1),it means that Bee will do the Dao for you.
You don't need to write the Dao by yourself anymore.Help you to focus more on the development of business logic.
Good Feature: AI, Timesaving/Tasteful, Easy, Automatic (AiTeaSoft Style)
Good News:
Newest version is:Bee V2.5.2 LTS(just 935k)
1.17.x LTS version:1.17.25
Sharding target: It is mainly transparent to business development and coding, with only a little sharding config.
Quick Start:Shardign better example
Bee see:
https://github.com/automvc/bee
bee-ext:
https://github.com/automvc/bee-ext
Python ORM Bee:
https://github.com/automvc/BeePy
中文介绍
Requirement
Bee jdk1.8+
Feature & Function:
Easy to use:
- 1.Simple interface, convenient to use. The Suid interface provides four object-oriented methods corresponding to the SQL language's select, update, insert, and delete operations.
- 2.By using Bee, you no longer need to write separate DAO code. You can directly call Bee's API to perform operations on the database.
- 3.Convention-over-configuration: Javabean can no annotation, no xml.
- 4.Intelligent automatic filtering of null and empty string properties in entities eliminates the need for writing code to check for non-null values.
- 5.Easily implement partial field queries and native statement pagination.
- 6.Supports returning query results in JSON format; supports chaining.
- 7.Supports Sharding, both database and table Sharding; database-only Sharding; table-only Sharding; and read-write separation. This functionality is transparent to existing code and does not require additional coding.
- 8.Easily extendable with multiple database support (MySQL, MariaDB, Oracle, H2, SQLite, PostgreSQL, SQL Server, Access, Kingbase, Dameng, etc.), and theoretically supports any database supported by JDBC. Additionally, supports Android and Harmony.
- 9.Additional database pagination support for: MsAccess, Cubrid, HSQL, Derby, Firebird, etc.
- 10.Multiple databases can be used simultaneously (e.g., MySQL, Oracle, SQL Server).
Automatic, powerful:
- 11.Dynamic/arbitrary combination of query conditions without the need to prepare DAO interfaces in advance. New query requirements can be handled without modifying or adding interfaces.
- 12.Supports transactions, using the same connection for multiple ORM operations, FOR UPDATE, batch processing, executing native SQL statements, and stored procedures.
- 13.Supports object-oriented complex queries, multi-table queries (no N+1 problem), and supports one-to-one, one-to-many, many-to-one, and many-to-many relationships. The result structure can differ based on whether the sub-table uses List;multi-table association update, insert, and delete(2.1.8).
- 14.MongoDB ORM and support for MongoDB Sharding.
- 15.Supports register, interceptor, multi-tenancy, and custom TypeHandlers for handling ResultSet results in queries. SetParaTypeConvert converts PreparedStatement parameter types.
- 16.Custom dynamic SQL tags, such as @in, @toIsNULL1, @toIsNULL2, <if isNotNull>, <if isNotBlank>. Allows dynamic SQL, converting lists into statements like in (1,2,3) without requiring foreach loops. Batch insertion also does not require foreach.
- 17.Complex query can be automatically parsed by the frontend and backend.
- 18.L1 cache, simple in concept and powerful in function; L1 cache can also be fine tuned like the JVM; Support updatable long-term cache list and update configuration table without restart. Inherently resistant to cache penetration. L2 cache extension support; Redis L2 cache support.
- 19.No third-party plugin dependencies; can be used with zero configuration.
- 20.High performance: close to the speed of JDBC; small file size: Bee V1.17.25 is only 520k, V2.5.2 is only 935k.
Assist function: -
- Provides a naturally simple solution for generating distributed primary keys: generates globally unique, monotonically increasing (within a worker ID) numeric IDs in a distributed environment.
- 22.Supports automatic generation of Javabean corresponding to tables(support Swagger), creating tables based on Javabean, and automatically generating backend Javaweb code based on templates. Can print executable SQL statements without placeholders for easy debugging. Supports generating SQL scripts in JSON format.
- 23.Supports reading Excel files and importing data into the database; simple operations. Supports generating database tables from Excel configurations.
- 24.Stream tool class StreamUtil;DateUtil date conversion, judge date format, calculate age.
- 25.Rich annotation support: PrimaryKey, Column, Datetime, Createtime, Updatetime; JustFetch, ReplaceInto (MySQL), Dict, DictI18n,GridFs, etc.
- 26.Use entity name _F (automatically generated) to reference entity field names, e.g., Users_F.name or in SuidRichExt interface using the format Users::getName.
Newest main Function
V2.5.2(2025·LTS)
2.5.2.1 New Year
- MongoDB update,delete,deleteById support for sharding
- MongoDB modify sharding cache enhance
- MongoDB index support for sharding
- add ShardingFullOpTemplate
- ObjSQLRich(SuidRich) add selectByTemplate for select
2.5.2.2 - fixed bug for MongodbShardingDdlEngine
- record and print sql execute time
bee.osql.showSqlExecuteTime=true
bee.osql.minSqlExecuteTime=0
8.use CQRS(Command Query Responsibility Segregation) operate database 2.5.2.6 - open some config in Honeyconfig as default
openEntityCanExtend = true
showSQL = true
showShardingSQL = true
showSqlExecuteTime = true
minSqlExecuteTime = 5; //ms - column allow use keyword
#there is a switch for it, default is true
bee.osql.naming.allowKeyWordInColumn=true
#define for append if bee do not contain them
bee.osql.naming.sqlKeyWordInColumn - separate logger; initialize config independently first
- BeeSimpleDataSourceBuilder is compatible with different style configurations
V2.4.2
- GenFiles support genFileViaStream
- Genbean:update genFieldFile,toString, add method setUpperFieldNameInFieldFile
- update DoNotSetTabShadngValue tip message(Sharding insert need set the sharding value)
- SuidRich selectById,deleteById support sharding
- Condition support clone
- fixed bug:
sharding select all(no paging)
sharding modify cache
Function Detail
Bee Support Database list:
1.MySQL
2.Oracle
3.SQL Server
4.MariaDB
5.H2
6.SQLite
7.PostgreSQL
8.MS Access
9.Kingbase
10.DM
11.OceanBase
12.Cubrid,HSQL,Derby,Firebird
13.Other DB that support JDBC
NOSQL:
14.Mongodb
15.ElasticSearch
16.Cassandra
Mobile environment (database):
17.Android
18.Harmony
ORM Compare
Compare in JDBC
Test Evn : Local windows.
DB: MySQL (Version 5.6.24).
Test point: Batch Insert;Paging Select; Transaction(update and select).
