All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.hengboy.job.schedule.store.JdbcSqlConstants Maven / Gradle / Ivy

The newest version!
/*
 *    Copyright [2019] [恒宇少年 - 于起宇]
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.github.hengboy.job.schedule.store;

/**
 * 数据库方式用到的常量信息
 * 如:操作数据库用到的sql
 *
 * @author:恒宇少年 - 于起宇
 * 

* DateTime:2019-01-28 14:28 * Blog:http://blog.yuqiyu.com * WebSite:http://www.jianshu.com/u/092df3f77bca * Gitee:https://gitee.com/hengboy * GitHub:https://github.com/hengyuboy */ public interface JdbcSqlConstants extends Constants { /* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * Constants. * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /** * 表前缀占位符 */ String TABLE_PREFIX_SUBST = "%s"; /* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * Table Execute Queue SQL. * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /** * 添加任务队列信息 */ String INSERT_EXECUTE_QUEUE = "INSERT INTO " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + "(" + COLUMN_EXECUTE_QUEUE_JEQ_ID + ", " + COLUMN_EXECUTE_QUEUE_JEQ_QUEUE_KEY + ", " + COLUMN_EXECUTE_QUEUE_JEQ_JOB_KEY + ", " + COLUMN_EXECUTE_QUEUE_JEQ_EXECUTE_AWAY + ", " + COLUMN_EXECUTE_QUEUE_JEQ_EXECUTE_PARAM + ", " + COLUMN_EXECUTE_QUEUE_JEQ_LB_STRATEGY + ", " + COLUMN_EXECUTE_QUEUE_JEQ_LB_WEIGHT + ") VALUES(?,?,?,?,?,?,?)"; /** * 更新任务队列cron表达式 */ String UPDATE_EXECUTE_QUEUE_CRON = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + " SET " + COLUMN_EXECUTE_QUEUE_JEQ_CRON + " = ? WHERE " + COLUMN_EXECUTE_QUEUE_JEQ_ID + " = ?"; /** * 更新任务队列的loop信息 */ String UPDATE_EXECUTE_QUEUE_LOOP = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + " SET " + COLUMN_EXECUTE_QUEUE_JEQ_LOOP_TIMES + " = ?, " + COLUMN_EXECUTE_QUEUE_JEQ_LOOP_INTERVAL_MILLIS + " = ? WHERE " + COLUMN_EXECUTE_QUEUE_JEQ_ID + " = ?"; /** * 删除任务队列信息 */ String REMOVE_EXECUTE_QUEUE = "DELETE FROM " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + " WHERE " + COLUMN_EXECUTE_QUEUE_JEQ_ID + " = ?"; /** * 查询任务队列详情信息 */ String SELECT_EXECUTE_QUEUE_DETAIL = "SELECT * FROM " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + " WHERE " + COLUMN_EXECUTE_QUEUE_JEQ_ID + " = ?"; /** * 根据任务队列key查询详情信息 */ String SELECT_EXECUTE_QUEUE_DETAIL_BY_KEY = "SELECT * FROM " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_QUEUE + " WHERE " + COLUMN_EXECUTE_QUEUE_JEQ_QUEUE_KEY + " = ?"; /* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * Table Execute Log SQL. * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /** * 查询任务日志详情 */ String SELECT_EXECUTE_LOG_DETAIL = "SELECT * FROM " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + " WHERE " + COLUMN_EXECUTE_LOG_JEL_ID + " = ?"; /** * 更新任务日志状态 */ String UPDATE_EXECUTE_LOG_STATE = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + " SET " + COLUMN_EXECUTE_LOG_JEL_STATE + " = ? WHERE " + COLUMN_EXECUTE_LOG_JEL_ID + " = ?"; /** * 更新任务日志执行的消费者地址 */ String UPDATE_EXECUTE_LOG_CONSUMER_ADDRESS = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + " SET " + COLUMN_EXECUTE_LOG_JEL_CONSUMER_ADDRESS + " = ? WHERE " + COLUMN_EXECUTE_LOG_JEL_ID + " = ?"; /** * 更新任务日志重试次数 */ String UPDATE_EXECUTE_LOG_RETRY_COUNT = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + " SET " + COLUMN_EXECUTE_LOG_JEL_RETRY_COUNT + " = ? WHERE " + COLUMN_EXECUTE_LOG_JEL_ID + " = ?"; ; /** * 更新任务日志执行成功时间 */ String UPDATE_EXECUTE_LOG_SUCCESS_TIME = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + " SET " + COLUMN_EXECUTE_LOG_JEL_SUCCESS_TIME + " = ? WHERE " + COLUMN_EXECUTE_LOG_JEL_ID + " = ?"; /** * 添加执行日志 */ String INSERT_EXECUTE_LOG = "INSERT INTO " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_LOG + "(" + COLUMN_EXECUTE_LOG_JEL_ID + "," + COLUMN_EXECUTE_LOG_JEL_SCHEDULE_ID + "," + COLUMN_EXECUTE_LOG_JEL_QUEUE_ID + "," + COLUMN_EXECUTE_LOG_JEL_NAMESPACE + ") VALUES (?,?,?,?)"; /* * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * Table Execute Schedule SQL. * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /** * 添加任务执行调度器 */ String INSERT_EXECUTE_SCHEDULE = "INSERT INTO " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_SCHEDULE + "(" + COLUMN_EXECUTE_SCHEDULE_JES_ID + "," + COLUMN_EXECUTE_SCHEDULE_JES_ADDRESS + ") VALUES(?,?)"; /** * 更新任务执行调度器状态 */ String UPDATE_EXECUTE_SCHEDULE_STATE = "UPDATE " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_SCHEDULE + " SET " + COLUMN_EXECUTE_SCHEDULE_JES_STATE + " = ? WHERE " + COLUMN_EXECUTE_SCHEDULE_JES_ADDRESS + " = ?"; ; /** * 删除任务调度器 */ String REMOVE_EXECUTE_SCHEDULE = "DELETE FROM " + TABLE_PREFIX_SUBST + TABLE_EXECUTE_SCHEDULE + " WHERE " + COLUMN_EXECUTE_SCHEDULE_JES_ADDRESS + " = ?"; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy