[HN Gopher] Extending SQLite with Rust
       ___________________________________________________________________
        
       Extending SQLite with Rust
        
       Author : philipwhiuk
       Score  : 111 points
       Date   : 2022-09-05 16:18 UTC (6 hours ago)
        
 (HTM) web link (ricardoanderegg.com)
 (TXT) w3m dump (ricardoanderegg.com)
        
       | bob1029 wrote:
       | This is great to see. We've been using UDFs with SQLite and .NET
       | for about 3 years now.
       | 
       | With just a little bit of imagination, you can build a very
       | powerful domain-specific language on top of a SQL dialect. There
       | is nothing that says your new SQL functions have to be free from
       | side effects either.
       | 
       | You can also do some _crazy_ stuff with recursive SQL evaluation.
       | I.e. a UDF that executes raw SQL command text, which itself can
       | contain the same invocation. Bonus points if this command text
       | resides in the same database and can reflect /edit itself at
       | runtime...
        
         | polyrand wrote:
         | Yes! I love UDFs in SQLite:
         | 
         | 1. I can just write functions in whatever programming language
         | I want.
         | 
         | 2. Not having to worry as much about overwriting other UDFs,
         | since different connections can have the same UDF with a
         | different implementation.
         | 
         | 3. Having the DB (SQLite) and the function definitions in the
         | same application code and in the same process makes some things
         | a lot easier and flexible.
         | 
         | I actually wrote about that too:
         | 
         | https://ricardoanderegg.com/posts/sqlite-developer-experienc...
        
       | harryvederci wrote:
       | Fun to see this on the front page right after reading this
       | comment:
       | 
       | https://news.ycombinator.com/item?id=32725455
        
         | [deleted]
        
         | killingtime74 wrote:
         | Give the people what they want
        
           | benreesman wrote:
           | Years ago there was a brief vogue for "How X Saved My
           | Startup".
           | 
           | "How Rust Extensions to SQLite Saved The Blockchain" would be
           | a banger in 2022! Someone do it!
        
       ___________________________________________________________________
       (page generated 2022-09-05 23:01 UTC)