Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing SQL_SetCharset native in SQLite #236

Merged
merged 1 commit into from Apr 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/sqlite/basic_sql.cpp
Expand Up @@ -595,6 +595,12 @@ static cell AMX_NATIVE_CALL SQL_QuoteStringFmt(AMX *amx, cell *params)
}
}

static cell AMX_NATIVE_CALL SQL_SetCharset(AMX *amx, cell *params)
{
/* SQLite supports only UTF-8/16 */
return 0;
}

AMX_NATIVE_INFO g_BaseSqlNatives[] =
{
{"SQL_MakeDbTuple", SQL_MakeDbTuple},
Expand All @@ -620,6 +626,7 @@ AMX_NATIVE_INFO g_BaseSqlNatives[] =
{"SQL_QuoteString", SQL_QuoteString},
{"SQL_QuoteStringFmt", SQL_QuoteStringFmt},
{"SQL_NextResultSet", SQL_NextResultSet},
{"SQL_SetCharset", SQL_SetCharset},

{NULL, NULL},
};
Expand Down
4 changes: 2 additions & 2 deletions modules/sqlite/msvc12/sqlite.vcxproj.filters
Expand Up @@ -80,7 +80,7 @@
<ClCompile Include="..\..\..\public\sdk\amxxmodule.cpp">
<Filter>Module SDK\SDK Base</Filter>
</ClCompile>
<ClCompile Include="..\sqlite-source\sqlite3.c">
<ClCompile Include="..\..\..\third_party\sqlite\sqlite3.c">
<Filter>SQLite Source</Filter>
</ClCompile>
</ItemGroup>
Expand Down Expand Up @@ -136,7 +136,7 @@
<ClInclude Include="..\moduleconfig.h">
<Filter>Module SDK</Filter>
</ClInclude>
<ClInclude Include="..\sqlite-source\sqlite3.h">
<ClInclude Include="..\..\..\third_party\sqlite\sqlite3.h">
<Filter>SQLite Source</Filter>
</ClInclude>
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion plugins/include/sqlx.inc
Expand Up @@ -67,7 +67,8 @@ native Handle:SQL_Connect(Handle:cn_tuple, &errcode, error[], maxlength);
*
* If a connection tuple is supplied, this should be called before SQL_Connect or SQL_ThreadQuery.
* Also note the change will remain until you call this function with another value.
*
* This native does nothing in SQLite.
*
* Example: "utf8", "latin1"
*
* @param h Database or connection tuple Handle.
Expand Down