GithubHelp home page GithubHelp logo

budding888 / bee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automvc/bee

0.0 2.0 0.0 171 KB

Bee is an easy and high efficiency ORM framework. Bee是开发速度快、编码少、简单、高效的ORM框架。

Home Page: https://github.com/automvc/bee

License: Apache License 2.0

Java 100.00%

bee's Introduction

Bee

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.
Good Feature: Timesaving/Tasteful, Easy, Automatic (Tea Style)
Bee see:
https://github.com/automvc/bee

点击链接可查看中文介绍

Requirement

jdk1.7+

Feature & Function:

V1.0
Single entity(table) Suid (select,update,insert,delete) object-oriented operation.
Automatically generate the Javabean via DB table or view(MySQL,MariaDB).
Convention-over-configuration:Javabean no annotation,no xml.
Automatically mapping the table column and the Javabean field.
Javabean support the raw type:int,double,and so on.
PreparedStatement support.
Procedure support.
Native SQL support.
Batch operate support.
Transaction support.
Automatic filter the null and empty field for default.
MAX,MIN,SUM,AVG,COUNT support.
Order by,Paging.
Select some field.
Dynamic & random combination of query conditions,no need to prepare the interface in advance; new query requirements, no need to change the query interface.
All Suid(select,update,insert,delete) operation use the same Bee interface,no longer need any new dao interface.
Users/Developer only need to pay attention to the Bee interface.

V1.1
Json format Result support.
Procedure(Query type) support.

V1.2
Customer sql support #{para} placeholder,eg:name=#{name}; like keyword support:#{%para%},#{%para},#{para%}

V1.3
Add: chain programming(select&update)

V1.4
Add: selectById,deleteById
Add: public List select(T entity,String selectFields,int from,int size)
Enhance: selectJson add config:ignoreNull;date,time,timestamp Wit hMillisecond format
Enhance: List<String[]> select(String sql), add config:nullToEmptyString

Quick Start:

1. Add Bee

1.1 if it is a maven project,add the following dependency

		<dependency>
			<groupId>org.teasoft</groupId>
			<artifactId>bee</artifactId>
			<version>1.4.2</version>
		</dependency>

		<dependency>
			<groupId>org.teasoft</groupId>
			<artifactId>honey</artifactId>
			<version>1.4.23</version>
		</dependency>

1.2 Of course, can download the jar file directly

2. Create the database and the table

Create one database,default name is bee.
Create the table and init the data by run the bee.sql file(it is mysql sql script).

3. Update the database configuration in bee.properties if need

If no the bee.properties file, you can create it by yourself.

bee.db.driverName = com.mysql.jdbc.Driver
bee.db.url =jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8
bee.db.username = root
bee.db.password =

4. Run the following java code

		
import java.math.BigDecimal;
import java.util.List;

import org.teasoft.bee.osql.Suid;
import org.teasoft.honey.osql.core.BeeFactory;
import org.teasoft.honey.osql.example.entity.Orders;

/**
 * @author Kingstar
 * @since  1.0
 */
public class OsqlExamEN {
	
	public static void main(String[] args) {
		Suid suid=BeeFactory.getHoneyFactory().getSuid();
		
		Orders orders1=new Orders();
		orders1.setId(100001L);
		orders1.setName("Bee--ORM Framework");
		
		List<Orders> list1 =suid.select(orders1);  //select
		for (int i = 0; i < list1.size(); i++) {
			System.out.println(list1.get(i).toString());
		}
		
		orders1.setName("Bee--ORM Framework");
		int updateNum=suid.update(orders1);   //update
		System.out.println("update record:"+updateNum);
		
		Orders orders2=new Orders();
		orders2.setUserid("client01");
		orders2.setName("ORM book");
		orders2.setTotal(new BigDecimal(91));
		orders2.setRemark("");  //empty String test
		
		int insertNum=suid.insert(orders2); //insert
		System.out.println("insert record:"+insertNum);
		
		int deleteNum=suid.delete(orders2);   //delete
		System.out.println("delete record:"+deleteNum);
		
		List<Orders> list2 =suid.select(orders1); //select  confirm the data
		for (int i = 0; i < list2.size(); i++) {
			System.out.println(list2.get(i).toString());
		}
	}

}

Rapid application development:

Let Java more quicker programming than php and Rails.

Faster development of new combinations of Java Web:
Bee+Spring+SpringMVC

Faster development of new combinations of Spring Cloud microservices:
Bee + Spring Boot

...

Contact & Welcome:

Author's email: [email protected]

If you have any problem on bee, please let me know kindly! Thank you, so much!

At the same time, welcome you to join Bee team create a better future.

bee's People

Contributors

automvc avatar aiteasoft avatar qq202 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.