level-sql icon indicating copy to clipboard operation
level-sql copied to clipboard

fuck it.

Open heapwolf opened this issue 12 years ago • 4 comments

heapwolf avatar Oct 29 '13 01:10 heapwolf

@hij1nx In my proof-of-concept of writing a MySQL driver that had the back-end implemented in levelup, called sql-engine. I used the simpleSqlParser to parse the SQL syntax, and then I transformed it to mongodb style query suitable for jsonquery.

eugeneware avatar Oct 30 '13 06:10 eugeneware

Ah, that looks cool. What are your thats on making sorts fast? Its a pretty old problem, but endlessly interesting.

heapwolf avatar Oct 30 '13 06:10 heapwolf

Yeah, sorts are tricky. In my proof-of-concept I didn't get to implementing the order by field stuff, sorry! And trying to do sorting in a streaming kind of way is hard too. Even with SQL databases, doing an order by delays the first result considerably versus not ordering the data.

eugeneware avatar Oct 30 '13 07:10 eugeneware

I think there are some sorted-stream type modules out there that I was looking at using to implement this, the more I think of it. Though most of those just do an Array.sort() and then stream the values if I recall...

eugeneware avatar Oct 30 '13 07:10 eugeneware