use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class ConfigTemplateDao method getAllConfigTemplates.
public List<ConfigTemplate> getAllConfigTemplates() throws SQLException {
SelectSqlBuilder builder = new SelectSqlBuilder().selectAll();
DalHints hints = DalHints.createIfAbsent(null);
return client.query(builder, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class DaoByFreeSql method getAllTasks.
public List<GenTaskByFreeSql> getAllTasks() throws SQLException {
DalHints hints = DalHints.createIfAbsent(null);
SelectSqlBuilder builder = new SelectSqlBuilder().selectAll();
List<GenTaskByFreeSql> list = client.query(builder, hints);
processList(list);
return list;
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class DaoBySqlBuilder method getAllTasks.
public List<GenTaskBySqlBuilder> getAllTasks() throws SQLException {
DalHints hints = DalHints.createIfAbsent(null);
SelectSqlBuilder builder = new SelectSqlBuilder().selectAll();
List<GenTaskBySqlBuilder> list = client.query(builder, hints);
processList(list);
return list;
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class DaoOfLoginUser method getAllUsers.
public List<LoginUser> getAllUsers() throws SQLException {
SelectSqlBuilder builder = new SelectSqlBuilder().selectAll();
DalHints hints = DalHints.createIfAbsent(null).allowPartial();
return client.query(builder, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class BaseQueryBuilderTest method testBuildSingle.
@Test
public void testBuildSingle() throws SQLException {
SelectSqlBuilder qb;
qb = createTest("Test", DatabaseCategory.MySql);
qb.select("columns").where("conditions").orderBy("ob", true).requireSingle();
assertEquals("SELECT `columns` FROM `Test` WHERE conditions ORDER BY `ob` ASC", qb.build());
assertEquals("SELECT `columns` FROM `Test_0` WHERE conditions ORDER BY `ob` ASC", qb.build("_0"));
qb = createTest("Test", DatabaseCategory.SqlServer);
qb.select("columns").where("conditions").orderBy("ob", true).requireSingle();
assertEquals("SELECT [columns] FROM [Test] WITH (NOLOCK) WHERE conditions ORDER BY [ob] ASC", qb.build());
assertEquals("SELECT [columns] FROM [Test_0] WITH (NOLOCK) WHERE conditions ORDER BY [ob] ASC", qb.build("_0"));
}
Aggregations