类 SqlToyConstants
- java.lang.Object
-
- org.sagacity.sqltoy.SqlToyConstants
-
public class SqlToyConstants extends Object
- 版本:
- v1.0,Date:2014年12月26日
- 作者:
- zhongxuchen
-
-
字段概要
-
构造器概要
构造器 构造器 说明 SqlToyConstants()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static booleandb2WithUR()static StringgetDefaultValue(Integer dbType, String defaultValue)static StringgetKeyValue(String key)static StringgetKeyValue(String key, String defaultValue)static intgetLoadAllBatchSize()static intgetMaxCodeSqlCount()static LonggetMaxThresholds()static intgetWarnThresholds()static voidloadProperties(Map<String,String> keyValues)static booleanopenSqlSign()static booleanoraclePageIgnoreOrder()static StringreplaceParams(String template)static voidsetUncachedKeyResult(String uncachedKeyResult)static voidsetWorkerAndDataCenterId(Integer workerId, Integer dataCenterId, Integer serverId)static booleanshowDatasourceInfo()
-
-
-
字段详细资料
-
logger
protected static final org.slf4j.Logger logger
定义日志
-
filters
public static HashMap<String,String> filters
符号对,用来提取字符串中对称字符的过滤,如:{ name(){} },第一个{对称的符合}是最后一位
-
UN_SUPPORT_MESSAGE
public static String UN_SUPPORT_MESSAGE
-
UN_MATCH_DIALECT_MESSAGE
public static String UN_MATCH_DIALECT_MESSAGE
-
UNION_ALL_REGEX
public static String UNION_ALL_REGEX
判断sql中是否存在union all的表达式
-
UNION_REGEX
public static String UNION_REGEX
判断sql中是否存在union的表达式
-
DEFAULT_PARAM_NAME
public static String DEFAULT_PARAM_NAME
当sql中是参数条件是?时转换后对应的别名模式:sagParamIndexName+index,如sagParamIndexName0、sagParamIndexName1 统一成别名模式的好处在于解决诸如分页、取随机记录等封装处理的统一性问题
-
UNCACHED_KEY_RESULT
public static String UNCACHED_KEY_RESULT
缓存翻译时在缓存中未匹配上key的返回信息
-
WORKER_ID
public static int WORKER_ID
服务器节点ID
-
DATA_CENTER_ID
public static int DATA_CENTER_ID
数据中心ID
-
SERVER_ID
public static String SERVER_ID
为22位或26位主键提供的主机Id
-
keywordSign
public static String keywordSign
-
SQL_IN_MAX
public static int SQL_IN_MAX
sql in 里面参数最大值
-
PARALLEL_MAXWAIT_SECONDS
public static int PARALLEL_MAXWAIT_SECONDS
并行默认最大等待时长
-
FETCH_SIZE
public static int FETCH_SIZE
-
DEFAULT_PAGE_SIZE
public static int DEFAULT_PAGE_SIZE
默认一页数据条数
-
executeSqlBlankToNull
public static boolean executeSqlBlankToNull
变更操作型sql空白默认转为null
-
INTERMEDIATE_TABLE
public static String INTERMEDIATE_TABLE
分页中间表名称
-
INTERMEDIATE_TABLE1
public static String INTERMEDIATE_TABLE1
-
paramPattern
public static final Pattern paramPattern
字符串中内嵌参数的匹配模式
-
SQL_NAMED_PATTERN
public static final Pattern SQL_NAMED_PATTERN
-
NOSQL_NAMED_PATTERN
public static final Pattern NOSQL_NAMED_PATTERN
-
withPattern
public static final Pattern withPattern
-
otherWithPattern
public static final Pattern otherWithPattern
-
NOT_PRINT_REGEX
public static final Pattern NOT_PRINT_REGEX
不输出sql的表达式
-
DO_PRINT_REGEX
public static final Pattern DO_PRINT_REGEX
-
IGNORE_EMPTY_REGEX
public static final Pattern IGNORE_EMPTY_REGEX
忽视空记录
-
INCLUDE_PATTERN
public static final Pattern INCLUDE_PATTERN
判断sql中是否存在@include(sqlId)的表达式
-
-
方法详细资料
-
getKeyValue
public static String getKeyValue(String key, String defaultValue)
- 参数:
key-defaultValue-- 返回:
-
db2WithUR
public static boolean db2WithUR()
- 返回:
-
getWarnThresholds
public static int getWarnThresholds()
- 返回:
-
getMaxCodeSqlCount
public static int getMaxCodeSqlCount()
- 返回:
-
getMaxThresholds
public static Long getMaxThresholds()
- 返回:
-
oraclePageIgnoreOrder
public static boolean oraclePageIgnoreOrder()
- 返回:
-
showDatasourceInfo
public static boolean showDatasourceInfo()
- 返回:
-
getDefaultValue
public static String getDefaultValue(Integer dbType, String defaultValue)
- 参数:
dbType-defaultValue-- 返回:
-
setUncachedKeyResult
public static void setUncachedKeyResult(String uncachedKeyResult)
- 参数:
uncachedKeyResult- the uncachedKeyResult to set
-
getLoadAllBatchSize
public static int getLoadAllBatchSize()
- 返回:
-
openSqlSign
public static boolean openSqlSign()
- 返回:
-
-