Skip to content

automain/fastjdbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

fastjdbc is a lightweight jdbc frame. It's designed around fast development, fast working and fast maintenance.

The following constraints must be accepted to use this frame:

  • Java EE 11 or later is necessary.
  • The primary key in the database table should be named by id and auto increment and not null and int type in mysql (java.lang.Integer type in java), or same level type in other database.
  • Logical deletion(soft delete) are recommended and the valid flag column should be named by 'is_valid' and tinyint type in mysql(java.lang.Integer type in java) or same level type in other database. '0' means the row is invalid and '1' means the row is valid.
  • column named by gid and char type in mysql (java.lang.String type in java) should be used when the table is designed by partition or save secret message in business.
  • A part of demo is in the test directory.

version history

2.6(2020-03-12):

  • move connection from all methods in BaseDao
  • add ThreadLocal property in ConnectionPool to save connection object

2.5(2019-11-23):

  • add execute sql return single and list type result in BaseDao, String\Integer\Long\BigDecimal type support at now

2.4(2019-11-18):

  • change frequently used methods to static in BaseDao
  • adjust test classes to fix change

2.3(2019-11-03):

  • remove BaseService class
  • move all classes to base dictionary
  • Incompatible with older versions and version below 2.3 is deprecated

2.2(2019-10-19):

  • disign upgrade for connection
  • change JDK version to 11(LTS)
  • remove ConectionBean and java.util.logging.Logger dependence
  • add slf4j as default log and output sql in debug level
  • Incompatible with older versions and version below 2.2 is deprecated

2.1(2019-08-21):

  • add gid(global id for partition table) column support
  • change primary column to named id and int type in mysql (java.lang.Integer type in java)
  • remove primaryKey and primaryValue function in BaseBean
  • adjust test method

2.0(2019-08-18):

  • disign upgrade for front and back end separation
  • remove RequestUtil and Servlet dependence
  • standardized naming for params and functions
  • Incompatible with older versions and version below 2.0 is deprecated

1.8(2018-12-08):

  • add getIntValues function in RequestUtil
  • change setTimeRange function in BaseDao, TimeStamp type property is deprecated and Integer type property with unix timestamp is suggested.
  • remove getTimestamp function in RequestUtil

1.7(2018-09-30):

  • add countTableByBean function in BaseDao
  • other bug fix

1.6(2018-09-19):

  • change init function in ConnectionPool from HikariCP config to given datasource
  • add RuntimeException at necessary position

1.5(2018-09-11):

  • add PageParameterBean as parameter of selectTableForPage function in BaseDao
  • add all main function test in test package, see MainTestThread
  • bug fix: when execute selectTableForPage function, the count sql should not be auto generated, so there is a property in PageParameterBean named countSql for customization
  • bug fix: when count result is zero in selectTableForPage, the query sql will not executed and return an empty list
  • bug fix: executeSelectReturnResultSet function in JDBCUtil can be return null, and the null result should be handled

1.4(2018-05-13):

  • replace notNullColumnMap() function in BaseBean by columnMap(boolean all)
  • add batchInsertIntoTable function
  • add all param in updateTable/updateTableByIdList function to distinguish whether update all columns or the not null columns

1.3(2018-03-24):

  • add deleteTableById function
  • add deleteTableByIdList function

1.2(2018-03-13):

  • add pageFromRequest function to get current page from request, default: 1
  • add limitFromRequest function to get page limit from request, default: 10

1.1(2018-03-07):

  • pom.xml and README.md adjust

1.0(2018-03-06):

  • init commit(see javadoc)

  • maven dependence
    <dependency>
        <groupId>com.github.automain</groupId>
        <artifactId>fastjdbc</artifactId>
        <version>2.6</version>
    </dependency>
    

license

Copyright 2019 fastjdbc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published