sql db_postgres update where in (…………)

2022-12-17 Thread alexeypetrushin
I created a [tiny wrapper](https://github.com/al6x/nim/blob/main/db/dbm.nim) that would allow to use convenient SQL queries, example (it will be similar with your original question about "update where ..."). Nim db.exec sql"""insert into users (name, age) values ({"Jim"}, {30})

Proposed method of defining models with Nim code in Nexus

2022-12-17 Thread jasonfi
One of the feedback items for Nexus was the ability to define models with Nim code, particularly Nim objects. Defining with Nim object types isn't ideal, because there's no validation or any way to provide defaults, so for the prototype code below I went with procs that help you define objects.

Trouble with Nim debugging in VS Code

2022-12-17 Thread RolandMunsil
Hello, I'm trying to get debugging set up for Nim in VS Code. I'm using this VS Code extension: and I followed the instructions listed on that page, except for installing lldb (since gdb seems to be already installed and i

sql db_postgres update where in (…………)

2022-12-17 Thread jiep
thank you both, i'll go with ThomasTJdev's at the moment. i was not far, i didn't dig enough to see sql**( **< query>**)** i saw only sql**" **< query>**"** so i tried to join and insert with ? but an error occured. i also forgot about & and was thinking about trying with fmt but i buged on how

Where is the documentation for fidgetty?

2022-12-17 Thread oldMan
Is there any fidgetty-specific documentation, or is the fidget docs (at nimdocs) compatible enough? Cutting and pasting from demo is not a great learning tool

Why is the cursor pragma called cursor?

2022-12-17 Thread Stefan_Salewski
I never had the feeling that Nims cursor is related to databases. My guess was that cursor is some form of alias for pointer and references? I think in German cursor is Mauszeiger. But actually, I should learn more about cursor pragma, see .

Why is the cursor pragma called cursor?

2022-12-17 Thread juancarlospaco
?, cursed name.

JS compiler produces a large file (with -d:release) ?

2022-12-17 Thread juancarlospaco
And that is completely unrelated to your original question. The native target is different from the browser target, in native target you do not get more performance for less LOC. And in browser target this whole discussion is kinda pointless too, because Nim can compile to WASM, thats probably

Why is the cursor pragma called cursor?

2022-12-17 Thread fxn
I cannot guess why the `cursor` pragma is called "cursor", which probably means I don't fully understand it.

Transpile Nim to Dart/Flutter?

2022-12-17 Thread Hlaaftana
https://github.com/HaxeFoundation/haxe/issues/7576

Transpile Nim to Dart/Flutter?

2022-12-17 Thread juancarlospaco
Haxe definitely goes Boom!.

JS compiler produces a large file (with -d:release) ?

2022-12-17 Thread UxDnz0
Why would you use something optimized for JS in your backend...? Just do something like this if you really want, but also ew. template withJsFmt(def: untyped, body: untyped): untyped = when defined(def): jsfmt: body else: body withJsFmt(javascript

JS compiler produces a large file (with -d:release) ?

2022-12-17 Thread rel
`src/nodejs/jsstrformat` would this lib work on server side rendering (no nodejs backend) too?

A new way for Nim to shine ? Faster than NodeJS interpreted Nim, taking advantage of declared types

2022-12-17 Thread alexeypetrushin
Nim already could be used as kinda interpreted language, say like Ruby/Python, it's already fast enough, with comparable compile speed to Ruby / Python / TypeScript. As far as I know there's (maybe even high priority?) work going on **incremental compilation** , it should make it much faster.

Transpile Nim to Dart/Flutter?

2022-12-17 Thread alexeypetrushin
Nim -> Haxe -> Boom! :)

sql db_postgres update where in (…………)

2022-12-17 Thread ThomasTJdev
When using nim's SQL generator you need to add the `IN ()`-values manually, since using the `?` will quote integer-values inside (`IN ('1','2','3')`). The example below uses a safe range of IDs, but if you are going to use external input for the IDs, then you need to validate the values manually