What's the difference between sqlite and better-sqlite3 implementations? I have to use better-sqlite3 to create a database for a form (+ only node.js and express), but the only clear example I found uses sqlite. Is there any difference? If not, thanks. Otherwise, do you know any usefull links for databases and forms with better-sqlite3? Thanks
            Asked
            
        
        
            Active
            
        
            Viewed 4,336 times
        
    2 Answers
8
            In better-sqlite3, you can register custom functions and aggregate functions written in JavaScript, which you can run from within SQL queries.
In better-sqlite3, you can iterate through the cursor of a result set, and then stop whenever you want (you don't have to load the entire result set into memory).
In better-sqlite3, you can conveniently receive query results in many different formats (here, here, and here).
In better-sqlite3, you can safely work with SQLite's 64-bit integers, without losing precision due to JavaScript's number format.
 
    
    
        Prinzhorn
        
- 22,120
- 7
- 61
- 65
2
            
            
        One important difference is: better-sqlite allows for synchronous SQLite queries. With sqlite, you can't do that.
 
    
    
        Matthias Reissner
        
- 308
- 1
- 18
 
    