Tearleads

document_intent_link_targets Client SQLite table

Additional link targets of a document placement intent in localIntents, keyed by that intent's current revision id and settled with it.

Declared in packages/client-sdk/src/data/sqlite/schema/documentPlacementIntentSchema.ts

Columns

  • intent_idtext
    • not null

    localIntents.id of the intent's current revision. Each enqueue rewrites the intent's targets under its new id.

  • operationtext
    • not null
    • default 'link'
    • one of link, unlink

    link adds the document to the container; unlink removes it from the container.

  • container_idtext
    • not null

    Container the document is linked to or unlinked from, besides the intent's target container.

Keys and constraints

  • Primary key(intent_id, container_id)

DDL

The statements the client runs to create this table and its indexes.

CREATE TABLE IF NOT EXISTS "document_intent_link_targets" (
  "intent_id" TEXT NOT NULL,
  "operation" TEXT NOT NULL DEFAULT 'link',
  "container_id" TEXT NOT NULL,
  PRIMARY KEY ("intent_id", "container_id")
);