Skip to contents

[Experimental]

Updates settings for a single collection in the database.

Usage

update_collection_settings(
  collection,
  status = NULL,
  visibility_override = NULL,
  extended_settings = NULL,
  cn = NULL
)

Arguments

collection

Character. Collection UUID. Validated with artcore::validate_uuid() where applicable.

status

Character. Collection status. Must be 'wip' or 'complete'. Default: NULL.

visibility_override

Character or NA. Visibility override. Must be NA (to clear), 'visible', or 'hidden'. Default: NULL.

extended_settings

List. Additional settings stored as JSONB. Default: NULL.

cn

Database connection. If NULL, creates a connection via artcore::dbc() and closes it on exit. Pass an existing connection to batch multiple queries efficiently.

Value

Logical. TRUE on success, FALSE on failure or if no record found.

Details

Updates fields in settings.collection_settings table. Only non-NULL parameters are updated. The updated_at timestamp is always set to NOW().