StarRocks业务开发tips
StarRocks1、StarRocks的非主键表的表字段不支持修改,一般需要重新建表,但是表名可以修改,可以新增或删除列。2、即使使用了mv_nvl或COALESCE等函数对NULL进行默认值设定,插入数据时还是报错NULL值插入了非空字
return $result[$k]; if (3 == DEBUG) return TRUE; if (1 == $gid) return TRUE; // 管理员有所有权限 if (!isset($grouplist[$gid])) return TRUE; $group = $grouplist[$gid]; $result[$k] = empty($group[$access]) ? FALSE : TRUE; return $result[$k]; } // 从缓存中读取 forum_list 数据 function group_list_cache() { global $conf; if ('mysql' == $conf['cache']['type']) { $grouplist = group_get(); } else { $grouplist = cache_get('grouplist'); if (NULL === $grouplist || FALSE === $grouplist) { $grouplist = group_find(); cache_set('grouplist', $grouplist); } } return $grouplist; } // 更新 forumlist 缓存 function group_list_cache_delete() { global $conf; $r = 'mysql' == $conf['cache']['type'] ? group_delete_cache() : cache_delete('grouplist'); return $r; } //--------------------------kv + cache-------------------------- $g_grouplist = FALSE; function group_get() { global $g_grouplist; FALSE === $g_grouplist AND $g_grouplist = website_get('grouplist'); if (empty($g_grouplist)) { $g_grouplist = group_find(); $g_grouplist AND group_set($g_grouplist); } return $g_grouplist; } function group_set($val) { global $g_grouplist; $g_grouplist = $val; return website_set('grouplist', $g_grouplist); } function group_delete_cache() { website_set('grouplist', ''); return TRUE; } ?>