What is the "correct" way to check if a node exists from within a custom module?
Scenario:
Webform results data is converted to Node via node_save. BUT we don't want to duplicate, only update, if the admin adjusts the results form.
I'm comfortable with doing db_query ala D6 method, and have searched the API docs, but couldn't see any pertinent method.
I'm having difficulties understanding the reason why you want to convert a webform submission into a node. Wouldn't it be easier to let people create nodes, instead of having them create a webform submission and then convert it programmatically into a node?
In any case, if you still want to do that, you have to decide which field should be unique (title? another field?). Then use EntityFieldQuery to check if a node with that field value exists. Here is info on how to use EFQ.