punkish

Results 28 comments of punkish

thanks. I think I know what is going on… my db connection is created in one file, and the plugin is in a different file like so ``` // file1.js...

a little bit more on this request (which I also vote in support of). Consider (my attempt below to write) the function below that would create a highlighted snippet from...

ok, thanks for the clear explanation that what I am trying to do is not possible. It might be worth adding your explanation to the document text so user-expectations are...

> Edit: I hadn't looked at your SQL at all, the `snippet(@q) ` part doesn't make sense, I assume you wanted to pass one of the columns as arguments? `snippet(@q)...

I was approaching this all wrong. If I make my function completely in JavaScript, it does work (within limits). Here is an example: ``` const db = new Database('./test.sqlite'); db.prepare('CREATE...

ha! you are absolutely correct in your insight. ~~No need for the `varargs` qualification as~~ the following works correctly ``` db.function('snippet', {varargs: true}, (str, substr, cssClass = 'hilite') => str.replace(substr,...

I have confirmed that the above behavior happens *only* with `better-sqlite3`. If I run plain SQL, everything just works, and I don't need to run a useless query to kickstart...

thanks. Yes, it seems very similar to what I am doing and experiencing. I am also using insert with `RETURNING` and triggers that insert into FTS tables, all wrapped in...

yes, but to be fair, there was some activity, and it was thought that the problem was fixed, except it wasn't. But it wasn't followed up also and, as you...

seems like `npx tap path/to/test.js` is the best option available to me so I don't have to install `tap` globally