Skip to content

ur_ingest_session_udi_pgp_sql

Description

UDI PGP stored response

Table Definition
CREATE TABLE "ur_ingest_session_udi_pgp_sql" (
"ur_ingest_session_udi_pgp_sql_id" VARCHAR PRIMARY KEY NOT NULL,
"sql" TEXT NOT NULL,
"nature" TEXT NOT NULL,
"content" BLOB,
"behaviour" TEXT CHECK(json_valid(behaviour) OR behaviour IS NULL),
"query_error" TEXT,
"uniform_resource_id" VARCHAR,
"ingest_session_id" VARCHAR,
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMPTZ,
"updated_by" TEXT,
"deleted_at" TIMESTAMPTZ,
"deleted_by" TEXT,
"activity_log" TEXT,
FOREIGN KEY("uniform_resource_id") REFERENCES "uniform_resource"("uniform_resource_id"),
FOREIGN KEY("ingest_session_id") REFERENCES "ur_ingest_session"("ur_ingest_session_id"),
UNIQUE("sql", "ingest_session_id")
)

Columns

NameTypeDefaultNullableParentsComment
ur_ingest_session_udi_pgp_sql_idVARCHARfalseur_ingest_session_udi_pgp_sql ULID primary key
sqlTEXTfalsefull query for the response
natureTEXTfalsetype of sql. DDL, DQL or DML
contentBLOBtrueraw response
behaviourTEXTtruethe query configuration passed in the comment
query_errorTEXTtrue
uniform_resource_idVARCHARtrueuniform_resourceuniform_resource row ID of original content
ingest_session_idVARCHARtrueur_ingest_session{“isSqlDomainZodDescrMeta”:true,“isVarChar”:true}
created_atTIMESTAMPTZCURRENT_TIMESTAMPtrue
created_byTEXT’UNKNOWN’true
updated_atTIMESTAMPTZtrue
updated_byTEXTtrue
deleted_atTIMESTAMPTZtrue
deleted_byTEXTtrue
activity_logTEXTtrue{“isSqlDomainZodDescrMeta”:true,“isJsonSqlDomain”:true}

Constraints

NameTypeDefinition
ur_ingest_session_udi_pgp_sql_idPRIMARY KEYPRIMARY KEY (ur_ingest_session_udi_pgp_sql_id)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN KEY (ingest_session_id) REFERENCES ur_ingest_session (ur_ingest_session_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE
- (Foreign key ID: 1)FOREIGN KEYFOREIGN KEY (uniform_resource_id) REFERENCES uniform_resource (uniform_resource_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_2UNIQUEUNIQUE (sql, ingest_session_id)
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_1PRIMARY KEYPRIMARY KEY (ur_ingest_session_udi_pgp_sql_id)
-CHECKCHECK(json_valid(behaviour) OR behaviour IS NULL)

Indexes

NameDefinition
idx_ur_ingest_session_udi_pgp_sql__ingest_session_idCREATE INDEX “idx_ur_ingest_session_udi_pgp_sql__ingest_session_id” ON “ur_ingest_session_udi_pgp_sql”(“ingest_session_id”)
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_2UNIQUE (sql, ingest_session_id)
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_1PRIMARY KEY (ur_ingest_session_udi_pgp_sql_id)

Relations

er