title: mysql queries before insert operation by syslog-ng
body: <p>I am using syslog-ng to parse some logs that I am receiving via a csv-parser. However, I want to achieve insert operations that are a bit more complex than the conventional insert using the "destination" option in syslog-ng. Currently, my destination into MYSQL from my syslog-ng conf file looks like this: </p>
  
  <pre><code>destination d_sql_test
  {
  sql(
  type(mysql)
  host('&lt;host&gt;') 
  username('&lt;user&gt;')
  password('&lt;pass&gt;')
  database('&lt;db_name&gt;')
  table('test')
  columns('col1')
  values('${val1}')
  );
  };
  </code></pre>
  
  <p>However, this simply just inserts the contents of val1 into the column col1. I want to be able to specify my insert "logic" as shown in the example in <a href="https://stackoverflow.com/questions/34192647/if-entry-is-in-database-then-discard-insert-operation-and-delete-entry">this question</a>.</p>
  
  <p>I am unsure as to where to actually do this, and if it is even supported by syslog-ng</p>