SqlHandle sqlhandle =new SqlHandle(SqlHandle.OPERATES[2],table); sqlhandle.OPERATEFILED(field1, value1);
/** * 排序操做符:順序 "ASC","DESC" */ public static final String[] SORTS ={"ASC","DESC"}; /** * 數據庫操做符:順序 "select","insert","update","delete" */ public static final String[] OPERATES={"select","insert","update","delete"};
//默認使用select語句 SqlHandle sqlhandle =new SqlHandle("user");
SqlHandle sqlhandle =new SqlHandle("user"); sqlhandle.FIELD(field,alias).CONDITION(filed1,"=", value).ORDERBY(SqlHandle.SORTS[0], field1).LIMIT(0,5);
生成插入 insert table SET field1=value1,field2=value2java
SqlHandle sqlhandle =new SqlHandle(SqlHandle.OPERATES[1],table); sqlhandle.OPERATEFILED(field1, value1).OPERATEFILED(field2, value2);
SqlHandle sqlhandle =new SqlHandle(SqlHandle.OPERATES[1],table); sqlhandle.OPERATEFILED(value1).OPERATEFILED(value2)
SqlHandle sqlhandle =new SqlHandle(SqlHandle.OPERATES[2],table); sqlhandle.OPERATEFILED(field1, value1);
SqlHandle sqlhandle =new SqlHandle(SqlHandle.OPERATES[3],table); sqlhandle.OPERATEFILED(field1, value1);
項目git分享地址:https://github.com/yoqu/SqlHandlemysql