juancarlospaco / nim-gatabase

Connection-Pooling Compile-Time ORM for Nim
https://juancarlospaco.github.io/nim-gatabase
MIT License
120 stars 5 forks source link

Document Async & Pooling Usage #5

Closed danpozmanter closed 4 years ago

danpozmanter commented 4 years ago

Using Gatabase in an async CRUD application would be delightful.

It'd be good to have documentation detailing how to use Gatabase in the context of a web server with async endpoints.

juancarlospaco commented 4 years ago
danpozmanter commented 4 years ago

Ah yes I've seen these. I'm not yet familiar enough with Nim to offer up a PR, apologies. But I can say being able to show usage with async (with both the api and the dsl) would be great. If it was straightforward to do so I would add the examples and documentation myself.

juancarlospaco commented 4 years ago

Welcome to Nim then!. API is basically 9 templates, very KISS, crazy fast too, take your time to explore. :)

danpozmanter commented 4 years ago

Is it just templates? Do you need the DSL to query? Is there a way to know what is returned when calling async, and how to use it, other than looking through the source code?

juancarlospaco commented 4 years ago

Both true, DSL are templates, macros.expandMacros can help you understand.

Documentation has all the argument types and all the return types, with few examples.

juancarlospaco commented 4 years ago

Feel free to pull request more examples or more documentation!. :)