Skip to content

Query.onError missing 3rd sql arg #115

@2048khz-gachi-rmx

Description

@2048khz-gachi-rmx

Functionality seems to have been lost between 9.6 and 9.7, but the docs still reference the sql argument.

9.6:

case QUERY_ERROR:
if (data->getErrorReference() != 0) {
this->runFunction(LUA, data->getErrorReference(), "ss", data->getError().c_str(), this->m_query.c_str());
} else if (data->isFirstData()) {

9.7:

void LuaIQuery::runErrorCallback(ILuaBase *LUA, const std::shared_ptr<IQueryData> &data) {
if (data->m_tableReference == 0) return;
if (!LuaIQuery::pushCallbackReference(LUA, data->m_errorReference, data->m_tableReference,
"onError", data->isFirstData())) {
return;
}
LUA->ReferencePush(data->m_tableReference);
auto error = data->getError();
LUA->PushString(error.c_str());
LuaObject::pcallWithErrorReporter(LUA, 2);
}

Docs:

MySQLOO/README.md

Lines 217 to 218 in b1d29b5

Query.onError( q, err, sql )
-- Called when the query errors, [String] err is the error and [String] sql is the SQL query that caused it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions