-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
More APIs. #125
More APIs. #125
Conversation
See #126. |
536fbc6
to
5c1e1a7
Compare
Need to work on deduping the PS: There's an additional challenge. Statements we |
81c1fa1
to
7365ee3
Compare
Taking a bit of creative license with how trace is used works for me 😄. The only thing I'm wondering is if people will take exception to it because trace sounds like something that has the potential for performance impact. |
This is pretty much wrapped up now. Documenting decisions. I decided that only statements explicitly prepared from Go will be traced. This is unlike SQLite, but it is the only way to make pointer identity/equality work, as long as Go does not have weak references. Traces about statements that weren't prepared from Go are simply ignored (this means So far, I haven't exposed Until Go has some form of interning (for strings, and objects) or weak references, which both seem unlikely (package |
2efc75e
to
3e12f37
Compare
Will wrap these before the next release.
These should be easy:
sqlite3_db_cacheflush
sqlite3_db_status
sqlite3_value_frombind
sqlite3_table_column_metadata
sqlite3_trace_v2
raises interesting questions. It'd be a second "constructor" for*sqlite3.Stmt
, which raises the question of pointer identity. If we want two*sqlite3.Stmt
to be equal, we need to dedup them, which means storing a list of them in*sqlite3.Conn
(which incidentally SQLite also does). We'd also probably need identity, to make it easier to trace the start/row/end moments of a*sqlite3.Stmt
run.If we do this, we can also iterate over statements in a connection (replacing
sqlite3_next_stmt
), andsqlite3_sql
andsqlite3_expanded_sql
can also start to make sense.These are also done:
sqlite3_sql
sqlite3_expanded_sql
sqlite3_next_stmt
sqlite3_trace_v2