omri
07/21/2022, 9:17 PMid: uuid and created_at: timestamp, and the following additions:
- the table urls has a host_and_path: string column containing a normalized url
- the table website_data has (among other columns) a url_id: uuid column pointing to a urls entry
both were created through the ui, no special sql wizardry going on here
when creating a website_data entry from my input data (which includes a url that i normalize) i'd like to create a urls entry if one doesn't exist, then take its id and use it as the newly created website_data entry's url_id, all in one go, and possibly for many entries in one call.
is that possible today or do i need to resort to an ugly and inefficient multi-step solution (upsert url returning id and normalized address, iterate through input data to match url ids to data objects, create website_data entry for each input datum using the info i need and the correct url_id)?Needle
07/21/2022, 9:17 PMgaryaustin
07/21/2022, 9:40 PMomri
07/22/2022, 1:42 AMomri
07/22/2022, 1:45 AMurls then links the new or existing urls entry to a new website_data entry created with the rest of the dataomri
07/22/2022, 1:45 AM