Open trevyn opened 3 years ago
With SQLite INSERT OR REPLACE INTO
INSERT OR REPLACE INTO
or
execute!( "INSERT INTO node(host, id)" "VALUES (" host, node.id ")" "ON CONFLICT(host) DO UPDATE SET id = " node.id )?;
Node { host: Some(host), id: Some(node.id), ..Default::default() }.upsert_on("host")?;
upsert!(Node { host, id: node.id });
insert!(Node { host, id: node.id });
Oh dear.
With SQLite
INSERT OR REPLACE INTO
or
Oh dear.