title: Step error in sqlite3_create_function_v2
body: <p>I'm using the sqlite3_create_function_v2 to define a ngram function.</p>
  
  <p>In this case the step is used as the xFunc pointer, it works as a charm, the signature for the step and the xFunc is the same.</p>
  
  <pre><code>sqlite3_create_function_v2(this-&gt;connection, "ngram", 3, SQLITE_ANY, NULL, SqliteExtension::stepExtendNGram, NULL, NULL, NULL);
  </code></pre>
  
  <p>When i try to use the step as the step it compiles but when i execute the command with the ngram it fails in the prepare statement.</p>
  
  <pre><code>sqlite3_create_function_v2(this-&gt;connection, "ngram", 3, SQLITE_ANY, NULL, NULL, SqliteExtension::stepExtendNGram, SqliteExtension::finalExtendNGram, NULL);
  </code></pre>
  
  <p>The SqliteExtension Code, for test the NGRAM is not yet implemented</p>
  
  <pre><code>void SqliteExtension::stepExtendNGram(sqlite3_context *ctx, int nArg, sqlite3_value ** val){
      //3 PARAMS
      std::cout &lt;&lt; "P1 " &lt;&lt; sqlite3_value_text(val[0]) &lt;&lt; " P2 " &lt;&lt; sqlite3_value_text(val[1]) &lt;&lt; std::endl;
      sqlite3_result_int(ctx, atoi((const char*) sqlite3_value_text(val[0])));
  
  }
  
  void SqliteExtension::finalExtendNGram(sqlite3_context *ctx){
  }
  </code></pre>
  
  <p>Sql call <code>select * from tbl_lista where ngram(id, "Asd", 3) &gt; 1</code></p>
  
  <p>The first parameter is the column, the second is the text to compare each column, the third is the N param</p>