Mysql insert with different javascript objects in raw sql

Hey folks,

I try to make an mysql insert into with data from and own defined data, see below.

INSERT INTO eddy_db.definition_keyword_pcb(
  {{ _.join(_.keys(form1.data), ', ') }},
  createdBy,
  createdAt
  )
values(
  {{ _.join(_.values(form1.data), ', '),
  {{ var1.value }},
  CURRENT_TIMESTAMP
  );

The query failes always with follwing message: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''name_en, name_de, alternative_en, alternative_de, comment, dbComment, dbAssigne' at line 2".

I found this Issue: issue-link
But I ask me, why is this not possible in Raw SQL?

Thanks a lot!

With javascript it looks like:

{{ {..._.mapValues(form1.data, v => v === '' ? null : v), ...{"createdBy": var_user.value, "createdAt": new Date().toISOString().slice(0, 19).replace('T', ' ')} } }}

It looks very complex... for such a simple stuff...

This implemented with " GUI" looks like:


I am serching for a RAW Mysql working code. Could anybody help?