TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Embedding Lua in Sqleibniz with Rust

59 pointsby xnacly5 months ago

2 comments

emmanueloga_5 months ago
Nice project! I was recently exploring LSPs for SQL. I have an idea to extend their functionality beyond static analysis into runtime data assistance, blending both static and runtime checks.<p>For example, given these files:<p><pre><code> -- file1.sql INSERT INTO authors (id, name) VALUES (42, &#x27;Lolo&#x27;), (43, &#x27;Tony&#x27;); -- file2.sql INSERT INTO posts (id, title, content) VALUES (17, &#x27;Post Title&#x27;, &#x27;Post Content&#x27;); -- file3.sql INSERT INTO author_posts (author_id, post_id) VALUES (42, 17); </code></pre> Imagine an LSPd that scans files, parses incomplete or broken SQL, and suggests data in real-time. For instance, while typing `VALUES (` in file3.sql, it would auto-complete `(42, &#x27;Lolo&#x27;) or (43, &#x27;Tony&#x27;)`, inferred from file1.sql.<p>There are a lot of caveats (like handling insertions, deletions, or the order of operations), but even partially reliable, plausible suggestions would provide enough value.<p>In my current project, I generate TypeScript for static checks and validate insertions at build time. However, an LSP like this could streamline the data insertion process and reduce the need for admin dashboards.<p>I’m not aware of any existing LSP servers that function this way. I’m interested in exploring this concept for Kuzu&#x2F;Cypher since my project data is graph-like, but the idea should be applicable to any data store.
lovasoa5 months ago
All I want for Christmas is a good LSP for SQL ! Ideally one that would be customizable enough to allow SQLPage functions and parameters.