sql-formater

A sql formater based on spring-jdbc

License

License

Categories

Categories

ORM Data
GroupId

GroupId

io.github.yanlizhe
ArtifactId

ArtifactId

sql-formater
Last Version

Last Version

1.9.0.RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

sql-formater
A sql formater based on spring-jdbc
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/yanlizhe/sql-formater

Download sql-formater

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.yanlizhe/sql-formater/ -->
<dependency>
    <groupId>io.github.yanlizhe</groupId>
    <artifactId>sql-formater</artifactId>
    <version>1.9.0.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.yanlizhe/sql-formater/
implementation 'io.github.yanlizhe:sql-formater:1.9.0.RELEASE'
// https://jarcasting.com/artifacts/io.github.yanlizhe/sql-formater/
implementation ("io.github.yanlizhe:sql-formater:1.9.0.RELEASE")
'io.github.yanlizhe:sql-formater:jar:1.9.0.RELEASE'
<dependency org="io.github.yanlizhe" name="sql-formater" rev="1.9.0.RELEASE">
  <artifact name="sql-formater" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.yanlizhe', module='sql-formater', version='1.9.0.RELEASE')
)
libraryDependencies += "io.github.yanlizhe" % "sql-formater" % "1.9.0.RELEASE"
[io.github.yanlizhe/sql-formater "1.9.0.RELEASE"]

Dependencies

compile (10)

Group / Artifact Type Version
org.apache.logging.log4j : log4j-api Optional jar 2.11.1
org.apache.logging.log4j : log4j-core Optional jar 2.11.1
commons-logging : commons-logging Optional jar 1.2
org.springframework : spring-core Optional jar 4.3.9.RELEASE
org.springframework : spring-beans Optional jar 4.3.9.RELEASE
org.springframework : spring-aop Optional jar 4.3.9.RELEASE
org.springframework : spring-expression Optional jar 4.3.9.RELEASE
org.springframework : spring-context Optional jar 4.3.9.RELEASE
org.springframework : spring-tx Optional jar 4.3.9.RELEASE
org.springframework : spring-jdbc Optional jar 4.3.9.RELEASE

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

sql-formater

Update

1.9.0.RELEASE

  • Upload code

Usage

Settings for spring(describe the database type):

<bean id="SqlConfiguration" class="net.xx.sqlFormater.SqlBeanFactory">
  <constructor-arg index="0" value="oracle" />
</bean>

A simple codding Example:

	public Integer findType(String id) {
		SqlStandardRead statement = CommonBeanFactory.getBean("SqlStandardRead", SqlStandardRead.class);
		
		statement.pushSelection("table_test", "column_type", "type");
    
		statement.setTable("table_test");

		statement.pushEqualString("table_test", "column_id", id);

		return statement.queryInteger();
	}
  
	public boolean insert(String id, String name, byte type) {
		SqlStandardInsert statement = CommonBeanFactory.getBean("SqlStandardInsert", SqlStandardInsert.class);
    
		statement.setTable("table_test");

		statement.setStringValue("column_id", id);
		statement.setStringValue("column_name", name);
		statement.setByteValue("column_type", type);
    
		return statement.execute() > 0;
	}

Versions

Version
1.9.0.RELEASE