Can't get id of LastInsertRowId synchronously
I had an unsolvable problem with the database library and insert query. I can't get id of LastInsertRowId synchronously, callback is asynchronously function, but i need to get ID synchronously. How to get it?

Insert query

Insert records into the database using an INSERT statement.

[HookMethod("Insert")]
long Insert(string sqlQuery, object[] args = null)
{
    Sql Command = this.Command(sqlQuery, args);
    sqlLibrary.Insert(Command, sqlConnection);
    return sqlConnection.LastInsertRowId;
}
There's no way AFAIK. Put everything into callback.
As usual, I made a plugin that works with the database and executes queries to the database, and other plugins simply call this plugin for hooks. In this form, I can’t hang calls on callback.

Merged post

Apparently, I really can’t do this, simply because there is no access to the threads