Skip to content

nanyang02/sql-formater

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
	}

About

No description, website, or topics provided.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%