Skip to content

Commit

Permalink
Update sql
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Aug 27, 2024
1 parent 383a330 commit 2772023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nextmn/srv6

go 1.22
go 1.22.1

require (
github.com/gin-gonic/gin v1.10.0
Expand Down
4 changes: 2 additions & 2 deletions internal/database/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ DECLARE
BEGIN
SELECT uuid, action_next_hop, action_srh FROM rule
WHERE (rule.type_uplink = TRUE AND rule.enabled = TRUE
AND in_gnb_ip << rule.match_gnb_ip_prefix AND in_ue_ip << rule.match_ue_ip_prefix)
AND in_gnb_ip << rule.match_gnb_ip_prefix AND in_ue_ip_address << rule.match_ue_ip_prefix)
INTO var_uuid, out_action_next_hop, out_action_srh
LIMIT 1;
IF not FOUND THEN
Expand All @@ -118,7 +118,7 @@ BEGIN
RETURN QUERY SELECT rule.action_next_hop AS "t_action_next_hop", rule.action_srh AS "t_action_srh"
FROM rule
WHERE (rule.type_uplink = FALSE AND rule.enabled = TRUE
AND in_ue_ip << match_ue_ip_prefix);
AND in_ue_ip_address << match_ue_ip_prefix);
END;$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION get_rule(
Expand Down

0 comments on commit 2772023

Please sign in to comment.