Skip to contents

Creates a complete artwork record across all related tables in a single transaction. This is the primary entry point for artwork ingestion from the processing pipeline.

All inserts happen atomically - if any fails, the entire transaction rolls back, leaving the database in a consistent state. This prevents orphan records.

Typically called by artpipelines::processArtwork() after all data tables have been prepared.

Usage

addArtwork(
  artist,
  artwork,
  artwork_colors,
  artwork_frame_analytics,
  artwork_hash,
  artwork_index,
  artwork_meta,
  artwork_paths,
  artwork_profiles,
  artwork_stats,
  artwork_styles,
  global_styles,
  cn = NULL,
  artwork_opensea = NULL
)

Arguments

artist

Artist UUID (owner of the artwork)

artwork

Artwork UUID (pre-generated by pipeline)

artwork_colors

data.table for artwork_colors table (per-frame color data)

artwork_frame_analytics

data.table for artwork_frame_analytics table

artwork_hash

data.table for artwork_hash table (image fingerprints)

artwork_index

data.table for artwork_index table (core record)

artwork_meta

data.table for artwork_meta table (image dimensions)

artwork_paths

data.table for artwork_paths table (CDN locations)

artwork_profiles

data.table for artwork_profiles table (AI descriptions)

artwork_stats

data.table for artwork_stats table (performance metrics)

artwork_styles

data.table for artwork_styles table (style tags)

global_styles

data.table for global_styles table (platform-wide tags)

cn

Database connection. If NULL, opens and closes automatically.

artwork_opensea

Optional data.table for NFT listing info

Value

TRUE invisibly on success. Errors on failure (transaction rolled back).