You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there can only be one profiler, one authorizer, one collation needed callback etc.
This is especially problematic with the profiler because apswtrace needs it, but if any other code installs a tracer then apswtrace sees nothing.
The simplest approach would be to add a name parameter when they are registered/unregistered. The default is None. Internally APSW would keep a list for the callback and invoke the appropriate ones.
As an example the sqlite3_tracev2 would be a array of:
Then when a trace event fires the list is traversed and any whose mask matches the event is called.
Some additional things:
It is common to remove callbacks while in a callback, so mutating the list while iterating it must work. The simplest thing is to make name and callback be NULL on deletion an never resize the list to be smaller.
Currently there can only be one profiler, one authorizer, one collation needed callback etc.
This is especially problematic with the profiler because apswtrace needs it, but if any other code installs a tracer then apswtrace sees nothing.
The simplest approach would be to add a
name
parameter when they are registered/unregistered. The default isNone
. Internally APSW would keep a list for the callback and invoke the appropriate ones.As an example the
sqlite3_tracev2
would be a array of:Then when a trace event fires the list is traversed and any whose
mask
matches the event is called.Some additional things:
name
andcallback
beNULL
on deletion an never resize the list to be smaller.name
matches on register/unregisterThe text was updated successfully, but these errors were encountered: