本文整理汇总了Java中org.skife.jdbi.v2.sqlobject.customizers.Define类的典型用法代码示例。如果您正苦于以下问题:Java Define类的具体用法?Java Define怎么用?Java Define使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Define类属于org.skife.jdbi.v2.sqlobject.customizers包,在下文中一共展示了Define类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: FROM
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT *, RESULT.ID AS RESULT_ID, RESULT.ERRNO FROM (SELECT T.TASK_ID, MT.MONITOR_ID, M.NAME AS MONITOR_NAME, T.ACCOUNT_ID, T.NAME, TASK_INTERVAL AS 'INTERVAL', CONFIG_JSON, T.STATUS, T.CREATION_TIME, T.MODIFIED_TIME FROM SNM_TASK T " +
"LEFT JOIN SNM_MONITOR_TASK MT ON MT.TASK_ID = T.TASK_ID " +
"LEFT JOIN SNM_MONITOR M ON M.MONITOR_ID = MT.MONITOR_ID " +
"WHERE T.ACCOUNT_ID = :accountId AND T.STATUS <ne> :taskDeleteStatus GROUP BY T.TASK_ID, MONITOR_ID) AS TMP " +
"LEFT JOIN ( " +
"SELECT R.ID, R.COLLECTED_TIME, R.MONITOR_ID, R.TASK_ID, R.ERRNO " +
"FROM SNM_NIPING_RESULT AS R " +
"INNER JOIN " +
"( " +
"SELECT MAX(RES2.ID) AS ID " +
"FROM SNM_NIPING_RESULT RES2 " +
"INNER JOIN ( " +
"SELECT MAX(COLLECTED_TIME) AS T1, MONITOR_ID, TASK_ID FROM SNM_NIPING_RESULT WHERE COLLECTED_TIME <ge> :lasthour AND TYPE = :type GROUP BY TASK_ID, MONITOR_ID " +
") AS RES1 " +
"ON RES2.COLLECTED_TIME = RES1.T1 AND RES1.MONITOR_ID = RES2.MONITOR_ID AND RES1.TASK_ID = RES2.TASK_ID " +
"GROUP BY RES2.COLLECTED_TIME, RES2.TASK_ID, RES2.MONITOR_ID\n" +
") AS RES3 " +
"ON R.ID = RES3.ID "+
") AS RESULT ON TMP.MONITOR_ID = RESULT.MONITOR_ID AND TMP.TASK_ID = RESULT.TASK_ID " +
" ORDER BY TMP.CREATION_TIME DESC")
@RegisterMapper(TaskMapper.class)
List<Task> selectByAccountId(@Bind("accountId") String accountId, @Bind("taskDeleteStatus") int taskDeleteStatus, @Bind("lasthour") Date lasthour, @Bind("type") int type, @Define("ne") String notEqual, @Define("ge") String greaterThan);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:23,代码来源:TaskDao.java
示例2: values
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlUpdate("delete from \"<schema>\".entry;" +
"delete from \"<schema>\".entry_item;" +
"delete from \"<schema>\".entry_system;" +
"delete from \"<schema>\".entry_item_system;" +
"delete from \"<schema>\".current_entry_number;" +
"insert into \"<schema>\".current_entry_number values(0);")
void wipeData(@Define("schema") String schema);
开发者ID:openregister,项目名称:openregister-java,代码行数:8,代码来源:TestEntryDAO.java
示例3: T
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
/**
* @param testcaseId
* @return folder path of the testcase
*/
@SqlQuery("WITH RECURSIVE T(parent_folder_id, path) AS (" +
"SELECT parent_folder_id, name AS path " +
"FROM folder WHERE id = (SELECT parent_folder_id FROM testcase WHERE id = <testcaseId>) " +
"UNION ALL " +
"SELECT T2.parent_folder_id, (T2.name || '/' || T.path) AS path " +
"FROM T INNER JOIN folder AS T2 ON T.parent_folder_id = T2.id " +
") SELECT path FROM T WHERE parent_folder_id IS NULL")
protected abstract String getFolderPath(@Define("testcaseId") long testcaseId);
开发者ID:zheng-wang,项目名称:irontest,代码行数:13,代码来源:TestcaseDAO.java
示例4: selectMonitors
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT SNM_MONITOR.MONITOR_ID, VERSION, ACCOUNT_ID, NAME, COUNTRY, PROVINCE, CITY, ISP, AREA, IP, NIPING_T, STATUS, CREATION_TIME, MODIFIED_TIME FROM SNM_MONITOR INNER JOIN SNM_MONITOR_TASK " +
" ON SNM_MONITOR.MONITOR_ID = SNM_MONITOR_TASK.MONITOR_ID" +
" WHERE ACCOUNT_ID = :accountId AND TASK_ID = :taskId <condition>")
@RegisterMapper(MonitorMapper.class)
List<Monitor> selectMonitors(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Define("condition") String condition);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorDao.java
示例5: updateTaskStatus
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlUpdate("UPDATE SNM_TASK SET STATUS = :status, MODIFIED_TIME = :modifiedTime WHERE TASK_ID = :taskId AND ACCOUNT_ID = :accountId AND STATUS <ne> :deleteStatus")
void updateTaskStatus(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("status") int status, @Bind("deleteStatus") int deleteStatus, @Bind("modifiedTime") Date modifiedTime, @Define("ne") String notEqual) ;
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:3,代码来源:TaskDao.java
示例6: IN
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT SNM_TASK.TASK_ID, MONITOR_ID, ACCOUNT_ID, NAME, TASK_INTERVAL AS 'INTERVAL', CONFIG_JSON, STATUS, CREATION_TIME, MODIFIED_TIME FROM SNM_TASK INNER JOIN SNM_MONITOR_TASK ON SNM_MONITOR_TASK.TASK_ID = SNM_TASK.TASK_ID " +
" WHERE SNM_MONITOR_TASK.MONITOR_ID = :monitorId AND SNM_MONITOR_TASK.TASK_ID NOT IN (<runningTaskIds>) AND STATUS = :taskEnableStatus AND REDISPATCHER <ne> :redispatcher")
@MaxRows(1)
@RegisterMapper(TaskMapper.class)
Task getNextStartTask(@Bind("monitorId") String monitorId, @BindIn("runningTaskIds") List<String> runningTaskIds, @Bind("taskEnableStatus") int taskEnableStatus, @Define("ne") String notEqual, @Bind("redispatcher") int redispatcher) ;
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:TaskDao.java
示例7: selectByTaskId
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT TASK_ID, ERRNO, ERRNO, TR2, AV2, M.MONITOR_ID, M.NAME, M.IP, M.COUNTRY, M.PROVINCE, M.CITY, M.ISP FROM SNM_NIPING_RESULT R " +
"INNER JOIN SNM_MONITOR M ON M.MONITOR_ID = R.MONITOR_ID " +
"WHERE R.ACCOUNT_ID = :accountId AND R.TASK_ID = :taskId AND TYPE = :type AND collected_Time <ge> :startDate")
@RegisterMapper(MonitorNiPingResultMapper.class)
List<MonitorNiPingResult> selectByTaskId(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("startDate") long startTime, @Bind("type") int type, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例8: FROM
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT M.MONITOR_ID, M.NAME, M.IP FROM (SELECT MONITOR_ID FROM SNM_NIPING_RESULT WHERE ACCOUNT_ID = :accountId AND TASK_ID = :taskId GROUP BY MONITOR_ID) TMP " +
" INNER JOIN SNM_MONITOR M ON M.MONITOR_ID = TMP.MONITOR_ID <condition>")
@RegisterMapper(ResultMonitorMapper.class)
List<Monitor> selectMonitors(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Define("condition") String condition);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:5,代码来源:MonitorNiPingResultDao.java
示例9: selectTRMetrics
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT R.COLLECTED_TIME, R.TR2 AS VALUE " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND TYPE = :type AND R.COLLECTED_TIME <ge> :time AND R.TR2 IS NOT NULL ORDER BY R.COLLECTED_TIME")
@RegisterMapper(MetricsMapper.class)
List<Metrics> selectTRMetrics(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("type") int type, @Bind("time") long time, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例10: selectAVMetrics
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT R.COLLECTED_TIME, R.AV2 AS VALUE " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND TYPE = :type AND R.COLLECTED_TIME <ge> :time AND R.AV2 IS NOT NULL <condition> ORDER BY R.COLLECTED_TIME")
@RegisterMapper(MetricsMapper.class)
List<Metrics> selectAVMetrics(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("type") int type, @Bind("time") long time, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例11: getMonitorNiPingResult
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT R.TYPE, R.ERRNO " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND R.COLLECTED_TIME <ge> :time <condition> ")
@RegisterMapper(MonitorNiPingResultUsableMapper.class)
List<MonitorNiPingResult> getMonitorNiPingResult(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("time") long time, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例12: select
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT R.COLLECTED_TIME, R.START_TIME, R.END_TIME, R.TYPE, R.AV2, R.ERRNO, R.ERRMSG, R.TR2 " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND R.COLLECTED_TIME <ge> :time <condition> ORDER BY R.COLLECTED_TIME DESC <page>")
@RegisterMapper(MonitorNiPingResultListMapper.class)
List<MonitorNiPingResult> select(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("time") long time, @Define("condition") String condition, @Define("page") String page, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例13: selectAll
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT R.COLLECTED_TIME, R.START_TIME, R.END_TIME, R.TYPE, R.AV2, R.ERRNO, R.ERRMSG, R.TR2 " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND R.COLLECTED_TIME <ge> :time <condition> ORDER BY R.COLLECTED_TIME DESC")
@RegisterMapper(MonitorNiPingResultListMapper.class)
List<MonitorNiPingResult> selectAll(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("time") long time, @Define("condition") String condition, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:6,代码来源:MonitorNiPingResultDao.java
示例14: COUNT
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT COUNT(1) " +
"FROM SNM_NIPING_RESULT R " +
"WHERE R.ACCOUNT_ID = :accountId AND R.MONITOR_ID = :monitorId AND R.TASK_ID = :taskId AND R.COLLECTED_TIME <ge> :time <condition> ")
long count(@Bind("accountId") String accountId, @Bind("taskId") String taskId, @Bind("monitorId") String monitorId, @Bind("time") long time, @Define("condition") String condition, @Define("ge") String ge);
开发者ID:CloudWise-OpenSource,项目名称:SAPNetworkMonitor,代码行数:5,代码来源:MonitorNiPingResultDao.java
示例15: getWhere
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT * FROM example WHERE <where>")
abstract List<Example> getWhere(@Define("where") String where);
开发者ID:oldpatricka,项目名称:spring-boot-jdbi,代码行数:3,代码来源:ExampleDao.java
示例16: getRequestHistory
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("SELECT request, createdAt, requestState, user, message FROM requestHistory WHERE requestId = :requestId ORDER BY createdAt <orderDirection> LIMIT :limitStart, :limitCount")
abstract List<SingularityRequestHistory> getRequestHistory(@Bind("requestId") String requestId, @Define("orderDirection") String orderDirection, @Bind("limitStart") Integer limitStart, @Bind("limitCount") Integer limitCount);
开发者ID:PacktPublishing,项目名称:Mastering-Mesos,代码行数:3,代码来源:HistoryJDBI.java
示例17: values
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".<entry_table>(entry_number, timestamp, key, type) values(:entry_number, :timestampAsLong, :key, :entryType::\"<schema>\".ENTRY_TYPE)")
@BatchChunkSize(1000)
void insertInBatch(@BindEntry Iterable<Entry> entries, @Define("schema") String schema, @Define("entry_table") String entryTable);
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:EntryDAO.java
示例18: currentEntryNumber
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlQuery("select value from \"<schema>\".current_entry_number")
int currentEntryNumber(@Define("schema") String schema);
开发者ID:openregister,项目名称:openregister-java,代码行数:3,代码来源:EntryDAO.java
示例19: setEntryNumber
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlUpdate("update \"<schema>\".current_entry_number set value=:entryNumber")
void setEntryNumber(@Bind("entryNumber") int currentEntryNumber, @Define("schema") String schema);
开发者ID:openregister,项目名称:openregister-java,代码行数:3,代码来源:EntryDAO.java
示例20: values
import org.skife.jdbi.v2.sqlobject.customizers.Define; //导入依赖的package包/类
@SqlBatch("insert into \"<schema>\".<entry_item_table>(entry_number, sha256hex) values (:entryNumber, :sha256hex)")
@BatchChunkSize(1000)
void insertInBatch(@BindBean Iterable<EntryItemPair> entries, @Define("schema") String schema, @Define("entry_item_table") String entryItemTable);
开发者ID:openregister,项目名称:openregister-java,代码行数:4,代码来源:EntryItemDAO.java
注:本文中的org.skife.jdbi.v2.sqlobject.customizers.Define类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论