When using Server Connect’s Database Insert step, I would find it very helpful to be able to choose INSERT IGNORE INTO, in addition to the existing INSERT INTO.
I often have to insert a large number of IDs into a table - perhaps a join table in a many:many relationship. The target table may only consist of two IDs (a unique combination) . It doesn’t matter if the combination of IDs already exists; in this case the insert can be ignored. The important thing is the insert operation should work.
As it is, if I want to add a selection of records, and the pair of IDs already exists, the operation will fail at the point the duplicate record is encountered. The only way to get round this is to check if the record exists before making the insert. In the case of a large number of records, this makes the process more compilcated and much slower.
For the time being, I’ve modified SqlBuilder.php to get this to work, but of course this may be overwritten by Wappler at some point. Also, it would be better to be able to choose whether or not to use the IGNORE option.
Last updated: