title: how to write a sqlite trigger in JS wrapper
body: <p>Let's assume 2 tables:
  table1[idTble1, elmt1_T1, elmt2_T1]
  table2[idTble2, id_Tble1, elmt1_T2, index]
  I want to create a trigger that runs after <code>Insert On table1</code>, and Insert a new row in Table2 where </p>
  
  <pre><code>id_Tble1 = new.idTble1
  elmt1_T2 = new.elmt1_T1
  </code></pre>
  
  <p>and index is a value set by the user and that is only saved in Table2.
  I have tried the following </p>
  
  <pre><code>var createTrigger = "CREATE TRIGGER triggerInsert AFTER INSERT ON Table1 REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW BEGIN INSERT INTO Table2 (id_Tble1, elmt1_T2, index) VALUES (:new.idTble1, :new.elmt_T1, ?); END;";
  db.transaction(function(tx) {
      tx.executeSql(createTrigger, [i], null, onError);
      });
  </code></pre>
  
  <p>but i got an error (could not prepare statement (1 near "REFERENCING": syntax error). </p>