message: SQL: Add DestroyPreparedQuery() to nwscript
diff: @@ -48,6 +48,10 @@ int NWNX_SQL_GetAffectedRows();
  // Return the database type we're interacting with (same value as the value of NWNX_SQL_TYPE environment var)
  string NWNX_SQL_GetDatabaseType();
  +// Free any resources attached to an existing prepared query.
  +// Resources are automatically freed when a new query is prepared, so calling this isn't necessary.
  +void NWNX_SQL_DestroyPreparedQuery();
  +
  int NWNX_SQL_PrepareQuery(string query)
  {
  NWNX_PushArgumentString("NWNX_SQL", "PREPARE_QUERY", query);
  @@ -65,7 +69,11 @@ int NWNX_SQL_ExecuteQuery(string query)
  {
  // Note: the implementation might change as support for more SQL targets arrives.
  if (NWNX_SQL_PrepareQuery(query))
  - return NWNX_SQL_ExecutePreparedQuery();
  + {
  + int ret = NWNX_SQL_ExecutePreparedQuery();
  + NWNX_SQL_DestroyPreparedQuery();
  + return ret;
  + }
  return FALSE;
  }
  @@ -146,4 +154,8 @@ string NWNX_SQL_GetDatabaseType()
  return NWNX_GetReturnValueString("NWNX_SQL", "GET_DATABASE_TYPE");
  }
  +void NWNX_SQL_DestroyPreparedQuery()
  +{
  + NWNX_CallFunction("NWNX_SQL", "DESTROY_PREPARED_QUERY");
  +}
  