Closed significantotter closed 1 year ago
Thanks @significantotter I totally missed this. Just replicated the issue and your solution. Added some test cases for escaping characters and will merge a solution asap.
No problem! I was really glad to find this library. Zod + Embedded db + Nosql was my entire wishlist for a library for my current project. Despite this small hurdle (which I was able to get past with a quick JSON.parse( JSON.stringify( data ).replaceAll( "'" , "''" ))
, I'm really enjoying this library so far!
@significantotter Should be good to go, version 0.6.1 should address this issue and allow you to use escaped characters while inserting/updating documents. Feel free to open another issue if you find any trouble 😄 .
Thanks!
Describe the bug On attempting to insert a collection item with a single quote in it, neboa crashes
To Reproduce
Expected behavior Neboa escapes special characters on insert. Use bound parameters instead of template literals for the database queries. For example: