Skip to content

Conversation

@erikoqvist
Copy link
Contributor

No description provided.

@@ -1,5 +1,5 @@
__version__ = "0.32.7"
__db_version__ = 7
__db_version__ = 8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab before operator

AFTER INSERT OR UPDATE OR DELETE
ON ip_net_pool
FOR EACH ROW
EXECUTE PROCEDURE tf_kafka_produce_event();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_pool
FOR EACH ROW

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_pool

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

EXECUTE PROCEDURE tf_kafka_produce_event();
CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

-- Triggers that write to kafka_produce_event
CREATE TRIGGER trigger_kafka_ip_net_plan
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_plan

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

-- Triggers that write to kafka_produce_event
CREATE TRIGGER trigger_kafka_ip_net_plan
AFTER INSERT OR UPDATE OR DELETE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

ELSIF OLD IS DISTINCT FROM NEW THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(NEW)::jsonb);
END IF;
RETURN NEW;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(OLD)::jsonb);
ELSIF OLD IS DISTINCT FROM NEW THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(NEW)::jsonb);
END IF;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

IF TG_OP = 'DELETE' THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(OLD)::jsonb);
ELSIF OLD IS DISTINCT FROM NEW THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(NEW)::jsonb);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs
line too long (123 > 79 characters)

BEGIN
IF TG_OP = 'DELETE' THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(OLD)::jsonb);
ELSIF OLD IS DISTINCT FROM NEW THEN

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE OR REPLACE FUNCTION tf_kafka_produce_event() RETURNS trigger AS $$
BEGIN
IF TG_OP = 'DELETE' THEN
INSERT INTO kafka_produce_event (table_name, event_type, payload) VALUES (TG_TABLE_NAME, TG_OP, row_to_json(OLD)::jsonb);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs
line too long (123 > 79 characters)

CREATE OR REPLACE FUNCTION tf_kafka_produce_event() RETURNS trigger AS $$
BEGIN
IF TG_OP = 'DELETE' THEN

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

event_type TEXT NOT NULL,
payload JSONB,
processed BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

table_name TEXT NOT NULL,
event_type TEXT NOT NULL,
payload JSONB,
processed BOOLEAN DEFAULT FALSE,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_pool
FOR EACH ROW

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_pool

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

EXECUTE PROCEDURE tf_kafka_produce_event();
CREATE TRIGGER trigger_kafka_ip_net_pool
AFTER INSERT OR UPDATE OR DELETE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

AFTER INSERT OR UPDATE OR DELETE
ON ip_net_vrf
FOR EACH ROW
EXECUTE PROCEDURE tf_kafka_produce_event();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

CREATE TRIGGER trigger_kafka_ip_net_vrf
AFTER INSERT OR UPDATE OR DELETE
ON ip_net_vrf
FOR EACH ROW

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation contains tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants