<commit_before>﻿select dropIfExists('VIEW', 'opportunity_info', 'xm');

-- return rule

create or replace view xm.opportunity_info as

select 
  id,
  "number",
  "name",
  is_active
from xm.opportunity;

-- insert rule

create or replace rule "_CREATE" as on insert to xm.opportunity_info
  do instead nothing;

-- update rule

create or replace rule "_UPDATE" as on update to xm.opportunity_info
  do instead nothing;

-- delete rule

create or replace rule "_DELETE" as on delete to xm.opportunity_info
  do instead nothing;<commit_msg>updated xm.opportunity_info to use private.create_model()<commit_after>﻿select private.create_model(

-- Model name, schema, table

'opportunity_info', 'public', 'ophead',

-- Columns

E'{
  "ophead.ophead_id as id",
  "ophead.ophead_number as \\"number\\"",
  "ophead.ophead_name as \\"name\\"",
  "ophead.ophead_active as is_active"}',

-- Rules

E'{"
-- insert rule

create or replace rule \\"_CREATE\\" as on insert to xm.opportunity_info
  do instead nothing;

","

-- update rule

create or replace rule \\"_UPDATE\\" as on update to xm.opportunity_info
  do instead nothing;

","

-- delete rule

create or replace rule \\"_DELETE\\" as on delete to xm.opportunity_info
  do instead nothing;

"}',

-- Conditions, Comment, System

'{}', 'Opporunity Info Model', true);
{'fraction_non_alphanumeric': 0.12252663622526636, 'fraction_numerical': 0.0, 'mean_word_length': 3.8703703703703702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6024123', 'n_tokens_mistral': 453, 'n_tokens_neox': 434, 'n_words': 144}