News for hackers. Stuff that matters.
Re:Show HN: My Go SQLite driver did poorly on a benchmark, s... by electroly on Saturday December 16, 2023 @01:32AM (#38662223)
The meat of the P/Invoke code is in here: https://github.com/electroly/sqlnotebook/tree/master/src/Sql...

The parent directory includes code that uses it. I'm most proud of this SQLite virtual table module that proxies queries to remote ADO.NET connections, allowing you to write joins directly between local SQLite tables and remote SQL Server tables. https://github.com/electroly/sqlnotebook/blob/master/src/Sql...

This is exposed to the user as a "LINK" option on the "IMPORT DATABASE" statement: https://sqlnotebook.com/import-database-stmt.html

I've also got a generic virtual table module that lets me easily write table-valued functions in C#: https://github.com/electroly/sqlnotebook/blob/master/src/Sql...

I don't have too many table-valued functions yet but one example is the "LIST_XLS_WORKSHEETS" function: https://sqlnotebook.com/list-xls-worksheets-func.html

I have my own implementation of SQLite's grammar so I can embed it inside my larger grammar which adds things like DECLARE, IF, and WHILE: https://github.com/electroly/sqlnotebook/blob/master/src/Sql...

The goal is to provide various "supercharged" features to base SQLite by taking advantage of all the extension points I can. I wish some went further; in particular the virtual table API doesn't "push down" enough of the original query to allow the module to avoid doing N+1 queries in some cases.

Always happy to see people using SQLite in unique ways!

Re:Show HN: My Go SQLite driver did poorly on a benchmark, s... by ncruces on Saturday December 16, 2023 @05:39PM (#38668443)
Oh I wanted to implement a virtual table to do the same thing in Go (access a remote DB, with where clause push down).

Will have a look at your code!