"use strict";
// ─── Workflow set CRUD ──────────────────────────────────────────────────────
Object.defineProperty(exports, "__esModule", { value: true });
exports.LIST_WORKFLOW_SETS_BASE = exports.DELETE_WORKFLOW_SET = exports.APPEND_WORKFLOW_SET_SPECIFICATION = exports.UPDATE_WORKFLOW_SET_STATUS = exports.UPDATE_WORKFLOW_SET_PLAN = exports.GET_WORKFLOW_SET = exports.CREATE_WORKFLOW_SET = void 0;
exports.CREATE_WORKFLOW_SET = `
  INSERT INTO lt_workflow_sets (name, description, specification, plan, namespaces, source_workflow_id)
  VALUES ($1, $2, $3, $4, $5, $6)
  RETURNING *`;
exports.GET_WORKFLOW_SET = `
  SELECT * FROM lt_workflow_sets WHERE id = $1`;
exports.UPDATE_WORKFLOW_SET_PLAN = `
  UPDATE lt_workflow_sets
  SET plan = $2, namespaces = $3, status = 'planned', updated_at = NOW()
  WHERE id = $1
  RETURNING *`;
exports.UPDATE_WORKFLOW_SET_STATUS = `
  UPDATE lt_workflow_sets
  SET status = $2, updated_at = NOW()
  WHERE id = $1
  RETURNING *`;
exports.APPEND_WORKFLOW_SET_SPECIFICATION = `
  UPDATE lt_workflow_sets
  SET specification = specification || E'\\n\\n---\\n\\n' || $2, updated_at = NOW()
  WHERE id = $1
  RETURNING *`;
exports.DELETE_WORKFLOW_SET = `
  DELETE FROM lt_workflow_sets WHERE id = $1`;
exports.LIST_WORKFLOW_SETS_BASE = `
  SELECT * FROM lt_workflow_sets`;
