/**
 * 
 */
package org.springblade.cube.utils;

import java.util.regex.Pattern;

/**
 * @author wookvn
 *
 */
public class CubeConstants {
	
	public final static int DEFAULT_PREVIEW_DATA_SIZE = 100;
	
	public final static String DEFAULT_SHOW_CHAR = "'-'";

	public final static String COLUMN_NAME_PREFIX = "COL_";
	
	public final static String COLUMN_ALIAS_NAME_PREFIX = "COL_ALIAS_";
	
	public final static String COLUMN_USER_ID = "JHBI_USER_ID";
	
	public final static String[] SUPPORTS_FILE = {"xls", "xlsx", "csv"};
	
	public final static String INSERT_INTO_SQL_FORMAT = "insert into %s %s values %s";
	
	public final static String SELECT_SQL_FORMAT = "select %s from %s where %s %s";
	
	public final static Pattern COLUMN_FORMULA_PATTERN = Pattern.compile("\\[.+?\\]");
	
	public final static String[] AGGREGATION_FUNCTIONS = {"sum(", "count(", "min(", "max(", "avg(", "stddev(", "median("};
	
	//支持数字格式
	public static String NUMBER_FORAMT_PATTERNS = "￥|¥|$|%|,|\\s*";
	
	//支持的日期格式
	public static String[] DATE_FORMAT_PATTERNS = {
            "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", 
            "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
            "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM",
            "yyyy年MM月dd日", "yyyy年MM月dd日 HH点mm分ss秒", "yyyy年MM月dd日 HH点mm分", "yyyy年MM月",
            "MM-dd", "MM/dd", "MM月dd日"};
	
}
