export interface MetaDataUpdate { sql: string; params: unknown[]; } /** * Build the UPDATE for writing one metafield into a `meta_data` JSONB column. * * A defined value merges via `jsonb_set`, creating the namespace object if * missing. `undefined` — validateMetafield's cleaned form of a blank optional * value — REMOVES the key with `#-` instead of storing a JSON null residue * (`#-` is a no-op on missing paths; every meta_data column is NOT NULL * DEFAULT '{}'). * * The key param inside `jsonb_build_object` carries an explicit `::text` * cast: the function is VARIADIC "any", so a parameter appearing only there * gives Postgres nothing to infer its type from and the statement fails at * parse time with `could not determine data type of parameter $N`. */ export declare function buildMetaDataUpdate(opts: { /** Unquoted table name; quoted here so reserved words ("order") are safe. */ table: string; /** WHERE clause consuming $1..$n for opts.idParams (e.g. 'product_id = $1'). */ whereClause: string; idParams: unknown[]; namespace: string; key: string; /** The value returned by validateMetafield; undefined removes the key. */ validated: unknown; }): MetaDataUpdate;