Feat(Project Hub): Apply for Founding Partner Program page created with database structure and methods.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
USE parts;
|
||||
USE fetchmetrics;
|
||||
|
||||
DROP PROCEDURE IF EXISTS parts.p_dog_get_many_location;
|
||||
DROP PROCEDURE IF EXISTS fetchmetrics.p_dog_get_many_location;
|
||||
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE parts.p_dog_get_many_location (
|
||||
CREATE PROCEDURE fetchmetrics.p_dog_get_many_location (
|
||||
IN a_id_user INT
|
||||
, IN a_get_all_location BIT
|
||||
, IN a_get_inactive_location BIT
|
||||
@@ -55,7 +55,7 @@ BEGIN
|
||||
MET.id_type
|
||||
, @errno
|
||||
, @text
|
||||
FROM parts.CORE_Msg_Error_Type MET
|
||||
FROM fetchmetrics.CORE_Msg_Error_Type MET
|
||||
WHERE MET.code = 'MYSQL_ERROR'
|
||||
;
|
||||
|
||||
@@ -70,7 +70,7 @@ BEGIN
|
||||
, ERROR_TYPE.text_colour
|
||||
, t_ERROR.msg
|
||||
FROM tmp_Msg_Error t_ERROR
|
||||
INNER JOIN parts.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type
|
||||
INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS tmp_Msg_Error;
|
||||
@@ -80,10 +80,10 @@ BEGIN
|
||||
SET v_guid := UUID();
|
||||
SET v_code_type_error_bad_data := 'BAD_DATA';
|
||||
SET v_code_type_error_no_permission := 'NO_PERMISSION';
|
||||
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM parts.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
|
||||
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM parts.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
|
||||
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM parts.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM parts.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
SET v_id_type_error_bad_data := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_bad_data LIMIT 1);
|
||||
SET v_id_type_error_no_permission := (SELECT ERROR_TYPE.id_type FROM fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE WHERE ERROR_TYPE.code = v_code_type_error_no_permission LIMIT 1);
|
||||
SET v_id_permission_dog_view := (SELECT PERMISSION.id_permission FROM fetchmetrics.DOG_Permission PERMISSION WHERE PERMISSION.code = 'DOG_VIEW' LIMIT 1);
|
||||
SET v_id_access_level_view := (SELECT ACCESS_LEVEL.id_access_level FROM fetchmetrics.DOG_Access_Level ACCESS_LEVEL WHERE ACCESS_LEVEL.code = 'VIEW' LIMIT 1);
|
||||
|
||||
SET a_id_user := IFNULL(a_id_user, 0);
|
||||
/*
|
||||
@@ -167,7 +167,7 @@ BEGIN
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL parts.p_dog_calc_user(
|
||||
CALL fetchmetrics.p_dog_calc_user(
|
||||
v_guid
|
||||
, 0 -- get_all_user
|
||||
, 0 -- get_inactive_user
|
||||
@@ -189,7 +189,7 @@ BEGIN
|
||||
IFNULL(CALC_USER_T.has_access, 0)
|
||||
INTO
|
||||
v_can_view
|
||||
FROM parts.DOG_Calc_User_Temp CALC_USER_T
|
||||
FROM fetchmetrics.DOG_Calc_User_Temp CALC_USER_T
|
||||
WHERE CALC_USER_T.GUID = v_guid
|
||||
LIMIT 1
|
||||
;
|
||||
@@ -218,14 +218,14 @@ BEGIN
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL parts.p_dog_clear_calc_user(
|
||||
CALL fetchmetrics.p_dog_clear_calc_user(
|
||||
v_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
|
||||
|
||||
-- Call Location Calc
|
||||
IF NOT EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN parts.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
IF NOT EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
IF a_debug = 1 THEN
|
||||
SELECT
|
||||
v_guid -- a_guid
|
||||
@@ -243,7 +243,7 @@ BEGIN
|
||||
;
|
||||
END IF;
|
||||
|
||||
CALL parts.p_dog_calc_location (
|
||||
CALL fetchmetrics.p_dog_calc_location (
|
||||
v_guid -- a_guid
|
||||
, a_id_user -- a_id_user
|
||||
, a_get_all_location -- a_get_all_location
|
||||
@@ -259,8 +259,8 @@ BEGIN
|
||||
);
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
SELECT COUNT(*) FROM parts.DOG_Location_Temp;
|
||||
SELECT * FROM parts.DOG_Location_Temp;
|
||||
SELECT COUNT(*) FROM fetchmetrics.DOG_Location_Temp;
|
||||
SELECT * FROM fetchmetrics.DOG_Location_Temp;
|
||||
END IF;
|
||||
|
||||
INSERT INTO tmp_Location (
|
||||
@@ -282,7 +282,7 @@ BEGIN
|
||||
|
||||
, LOCATION_T.does_meet_id_filters
|
||||
, LOCATION_T.does_meet_non_id_filters
|
||||
FROM parts.DOG_Location_Temp LOCATION_T
|
||||
FROM fetchmetrics.DOG_Location_Temp LOCATION_T
|
||||
WHERE LOCATION_T.GUID = v_guid
|
||||
;
|
||||
|
||||
@@ -293,7 +293,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
-- Filter outputs
|
||||
IF EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN parts.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
IF EXISTS(SELECT * FROM tmp_Msg_Error t_ERROR INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type WHERE ERROR_TYPE.is_breaking_error = 1 LIMIT 1) THEN
|
||||
IF a_debug = 1 THEN
|
||||
SELECT * FROM tmp_Location;
|
||||
END IF;
|
||||
@@ -316,7 +316,7 @@ BEGIN
|
||||
, t_LOCATIONS.does_meet_id_filters
|
||||
, t_LOCATIONS.does_meet_non_id_filters
|
||||
FROM tmp_Location t_LOCATIONS
|
||||
LEFT JOIN parts.DOG_Location LOCATION_PARENT ON t_LOCATIONS.id_location_parent = LOCATION_PARENT.id_location
|
||||
LEFT JOIN fetchmetrics.DOG_Location LOCATION_PARENT ON t_LOCATIONS.id_location_parent = LOCATION_PARENT.id_location
|
||||
ORDER BY
|
||||
LOCATION_PARENT.name
|
||||
, t_LOCATIONS.name
|
||||
@@ -335,14 +335,14 @@ BEGIN
|
||||
, ERROR_TYPE.text_colour
|
||||
, t_ERROR.msg
|
||||
FROM tmp_Msg_Error t_ERROR
|
||||
INNER JOIN parts.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type
|
||||
INNER JOIN fetchmetrics.CORE_Msg_Error_Type ERROR_TYPE ON t_ERROR.id_type = ERROR_TYPE.id_type
|
||||
;
|
||||
|
||||
IF a_debug = 1 AND v_can_view = 1 THEN
|
||||
SELECT * FROM tmp_Location;
|
||||
END IF;
|
||||
|
||||
CALL parts.p_dog_clear_calc_location(
|
||||
CALL fetchmetrics.p_dog_clear_calc_location(
|
||||
v_guid -- a_guid
|
||||
, 0 -- a_debug
|
||||
);
|
||||
@@ -351,7 +351,7 @@ BEGIN
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_Location;
|
||||
|
||||
IF a_debug = 1 THEN
|
||||
CALL parts.p_core_debug_timing_reporting ( v_time_start );
|
||||
CALL fetchmetrics.p_core_debug_timing_reporting ( v_time_start );
|
||||
END IF;
|
||||
END //
|
||||
DELIMITER ;
|
||||
@@ -359,7 +359,7 @@ DELIMITER ;
|
||||
|
||||
/*
|
||||
|
||||
CALL parts.p_dog_get_many_location (
|
||||
CALL fetchmetrics.p_dog_get_many_location (
|
||||
1 -- 'auth0|6582b95c895d09a70ba10fef', -- a_id_user
|
||||
, 1 -- a_get_all_location
|
||||
, 0 -- a_get_inactive_location
|
||||
|
||||
Reference in New Issue
Block a user