sqlite icon indicating copy to clipboard operation
sqlite copied to clipboard

tracing with runtime/trace

Open crawshaw opened this issue 7 years ago • 2 comments

If sqlite.Pool moves to sqlitex as described in #47, it can take a context and that opens up the possibility of using runtime/trace for tracing.

As the sqlite package cannot depend on context, the trace object will have to be passed in from sqlitex using an adapter. That's easy enough.

A potential problem: what does tracing mean for an sqlite query? Commands like INSERT or UPDATE or SELECTs with a single call to sqlite3_step are easy, but multi-row queries are processed incrementally, so accounting is tricky.

crawshaw avatar Dec 20 '18 21:12 crawshaw

Why can the sqlite package not depend on context?

In another issue I realized that you are avoiding context to avoid importing reflect for ease of use with tinygo.

AdamSLevy avatar Dec 10 '19 21:12 AdamSLevy

Is tracing implemented in sqlitex at this point?

AdamSLevy avatar Dec 12 '19 19:12 AdamSLevy